Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/next' into rm-v1-profile-writes
Browse files Browse the repository at this point in the history
Signed-off-by: Gene Johnston <[email protected]>
  • Loading branch information
gejohnston committed Mar 13, 2024
2 parents 21ccfda + e018177 commit 4aad1fe
Show file tree
Hide file tree
Showing 22 changed files with 311 additions and 253 deletions.
4 changes: 2 additions & 2 deletions __tests__/__packages__/cli-test-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zowe/cli-test-utils",
"version": "8.0.0-next.202403122137",
"version": "8.0.0-next.202403131702",
"description": "Test utilities package for Zowe CLI plug-ins",
"author": "Zowe",
"license": "EPL-2.0",
Expand Down Expand Up @@ -43,7 +43,7 @@
"devDependencies": {
"@types/js-yaml": "^4.0.9",
"@types/uuid": "^9.0.8",
"@zowe/imperative": "8.0.0-next.202403122137"
"@zowe/imperative": "8.0.0-next.202403131702"
},
"peerDependencies": {
"@zowe/imperative": "^8.0.0-next"
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "8.0.0-next.202403122137",
"version": "8.0.0-next.202403131702",
"command": {
"publish": {
"ignoreChanges": [
Expand Down
122 changes: 61 additions & 61 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ All notable changes to the Zowe CLI package will be documented in this file.

- Enhancement: Changed references in command output from 'Team Configuration' to 'Zowe client configuration' [#2019](https://github.com/zowe/zowe-cli/issues/2019).

## `8.0.0-next.202403131702`

- BugFix: Removing stack trace for zosjobs errors. [#2078](https://github.com/zowe/zowe-cli/pull/2078)

## `8.0.0-next.202403122137`

- BugFix: Fixed default base profile missing in config generated by `zowe config auto-init` [#2088](https://github.com/zowe/zowe-cli/pull/2088)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ describe("zos-jobs submit local-file command", () => {
const response = runCliScript(__dirname + "/__scripts__/submit_invalid_local_file.sh",
TEST_ENVIRONMENT);
expect(response.status).toBe(1);
expect(response.stderr.toString().toLowerCase()).toContain("error");
expect(response.stderr.toString().toLowerCase()).toContain("no such file");
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,33 @@ describe("submit shared handler", () => {
expect(error.message).toContain("Unable to determine the JCL source. Please contact support");
});

it("should return any caught error, ie: ENOENT", async () => {
// Require the handler and create a new instance
const handlerReq = require("../../../../src/zosjobs/submit/Submit.shared.handler");
const handler = new handlerReq.default();

// Vars populated by the mocked function
let error;

// Local file doesn't exist and should be cause of failure
const theLocalFile: string = "fakefile";

const copy = Object.assign({}, LOCALFILE_PARAMETERS);
copy.arguments.localFile = theLocalFile;
try {
// Invoke the handler with a full set of mocked arguments and response functions
await handler.process(copy);
} catch (e) {
error = e;
}

expect(error).toBeDefined();
expect(error).toBeInstanceOf(ImperativeError);
expect(error.message).toContain("Node.js File System API error");
expect(error.additionalDetails).toContain("ENOENT: no such file or directory, open");
expect(error.additionalDetails).toContain("fakefile");
});

it("should not transform an error thrown by the submit JCL API", async () => {
// Require the handler and create a new instance
const handlerReq = require("../../../../src/zosjobs/submit/Submit.shared.handler");
Expand Down
Loading

0 comments on commit 4aad1fe

Please sign in to comment.