Skip to content

Commit

Permalink
fix system and unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: jace-roell <jace.roell@hotmail.com>
  • Loading branch information
jace-roell committed Feb 3, 2025
1 parent cbde32c commit 0b453fb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@ describe("Create Partitioned Data Set", () => {
it("should fail creating a partitioned data set extended due to invalid data-set-type", () => {
const response = runCliScript(__dirname + "/__scripts__/command/command_create_pdse_fail_dsntype.sh",
TEST_ENVIRONMENT, [user]);
expect(response.stderr.toString()).toContain("Unable to perform this operation due to the following problem.");
expect(response.stderr.toString()).toContain("NONLIBRARY");
expect(response.stderr.toString()).toContain("Invalid zos-files create command 'dsntype' option: NONLIBRARY");
});

it("should fail creating a partitioned data set due to exceeding maximum value for size (primary space)", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,19 @@ describe("Create data set Validator", () => {
expect(testOptions.secondary).toEqual(0); // Should be changed during create validation to zOSMF default of 0
});

it("should fail when dsntype specified with invalid value", async () => {
let error;
try {

const testOptions: any = {dsntype: "NOTLIBRARY"};
Create.dataSetValidateOptions(testOptions);
} catch (err) {
error = err.message;
}

expect(error).toContain(`Invalid zos-files create command 'dsntype' option`);
});

it("recfm should not default to anything if not specified", async () => {
const testOptions: any = {
recfm: undefined
Expand Down

0 comments on commit 0b453fb

Please sign in to comment.