From f49728341d9b48392e4ae54e53b25044e7f68679 Mon Sep 17 00:00:00 2001 From: Pujal Date: Wed, 23 Oct 2024 14:54:24 -0400 Subject: [PATCH 01/11] code implementation plus tests Signed-off-by: Pujal --- .../__resources__/api/GetJobsData.ts | 6 ++ .../__tests__/__unit__/GetJobs.unit.test.ts | 21 +++++-- .../__snapshots__/GetJobs.unit.test.ts.snap | 58 +++++++++++++++++++ packages/zosjobs/src/GetJobs.ts | 1 + packages/zosjobs/src/doc/response/IJob.ts | 14 +++++ 5 files changed, 95 insertions(+), 5 deletions(-) diff --git a/packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts b/packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts index 645c347331..6ff94b39b9 100644 --- a/packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts +++ b/packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts @@ -29,6 +29,8 @@ export class GetJobsData { public static readonly SAMPLE_COMPLETE_JOB: IJob = { "jobid": "TSUxxx", "jobname": "IBMUSER$", + "exec-started": '2024-01-02T15:57:58.350Z', + "exec-ended": '2024-01-02T15:58:00.600Z', "subsystem": "JES2", "owner": "IBMUSER", "status": "OUTPUT", @@ -51,6 +53,8 @@ export class GetJobsData { public static readonly SAMPLE_COMPLETE_JOB_AGAIN: IJob = { "jobid": "JOBxxx", "jobname": "CAUSER$", + "exec-started": '2024-01-02T15:57:58.350Z', + "exec-ended": '2024-01-02T15:58:00.600Z', "subsystem": "JES2", "owner": "CAUSER", "status": "OUTPUT", @@ -81,6 +85,8 @@ export class GetJobsData { public static readonly SAMPLE_ACTIVE_JOB: IJob = { "retcode": null, "jobname": "IBMUSER$", + "exec-started": '2024-01-02T15:57:58.350Z', + "exec-ended": '2024-01-02T15:58:00.600Z', "status": "INPUT", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "class": "A", diff --git a/packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts b/packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts index f8a0e3138d..232d1b984f 100644 --- a/packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts +++ b/packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts @@ -596,21 +596,28 @@ describe("GetJobs tests", () => { owner: 'zowe', status: 'active', type: 't', class: 'c', retcode: 'r', url: '', 'files-url': '', 'job-correlator': '', - phase: 1, 'phase-name': 'name', 'reason-not-running': 'no' + phase: 1, 'phase-name': 'name', 'reason-not-running': 'no', + 'exec-started': '2024-01-02T15:57:58.350Z', + 'exec-ended': '2024-01-02T15:58:00.600Z' }, { jobid: '2', jobname: 'b', subsystem: 'sub', owner: 'zowe', status: 'Output', type: 't', class: 'c', retcode: 'r', url: '', 'files-url': '', 'job-correlator': '', - phase: 1, 'phase-name': 'name', 'reason-not-running': 'no' + phase: 1, 'phase-name': 'name', 'reason-not-running': 'no', + 'exec-started': '2024-01-02T15:57:58.350Z', + 'exec-ended': '2024-01-02T15:58:00.600Z' }, { jobid: '3', jobname: 'c', subsystem: 'sub', owner: 'kri', status: 'Output', type: 't', class: 'c', retcode: 'r', url: '', 'files-url': '', 'job-correlator': '', - phase: 1, 'phase-name': 'name', 'reason-not-running': 'no' + phase: 1, 'phase-name': 'name', 'reason-not-running': 'no', + 'exec-started': '2024-01-02T15:57:58.350Z', + 'exec-ended': '2024-01-02T15:58:00.600Z' + } ]; const expectedJobs = [ @@ -619,14 +626,18 @@ describe("GetJobs tests", () => { owner: 'zowe', status: 'Output', type: 't', class: 'c', retcode: 'r', url: '', 'files-url': '', 'job-correlator': '', - phase: 1, 'phase-name': 'name', 'reason-not-running': 'no' + phase: 1, 'phase-name': 'name', 'reason-not-running': 'no', + 'exec-started': '2024-01-02T15:57:58.350Z', + 'exec-ended': '2024-01-02T15:58:00.600Z' }, { jobid: '3', jobname: 'c', subsystem: 'sub', owner: 'kri', status: 'Output', type: 't', class: 'c', retcode: 'r', url: '', 'files-url': '', 'job-correlator': '', - phase: 1, 'phase-name': 'name', 'reason-not-running': 'no' + phase: 1, 'phase-name': 'name', 'reason-not-running': 'no', + 'exec-started': '2024-01-02T15:57:58.350Z', + 'exec-ended': '2024-01-02T15:58:00.600Z' } ]; const filteredResults = GetJobs['filterResultsByStatuses'](jobs, { status: 'OUTPUT', owner: 'zowe' }); diff --git a/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap b/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap index a8c7fff252..707755244a 100644 --- a/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap +++ b/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap @@ -14,6 +14,8 @@ exports[`GetJobs tests getJobs APIs should allow getting jobs by common method w Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -29,6 +31,8 @@ Array [ }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -49,6 +53,8 @@ exports[`GetJobs tests getJobs APIs should allow getting jobs by common method w Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -64,6 +70,8 @@ Array [ }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -84,6 +92,8 @@ exports[`GetJobs tests getJobs APIs should get a list of jobs from getJobs and g Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -99,6 +109,8 @@ Array [ }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -119,6 +131,8 @@ exports[`GetJobs tests getJobs APIs should get a list of jobs from getJobs and g Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -134,6 +148,8 @@ Array [ }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -154,6 +170,8 @@ exports[`GetJobs tests getJobs APIs should get a list of jobs from getJobsCommon Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -169,6 +187,8 @@ Array [ }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -189,6 +209,8 @@ exports[`GetJobs tests getJobs APIs should get a list of jobs from getJobsCommon Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -204,6 +226,8 @@ Array [ }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -224,6 +248,8 @@ exports[`GetJobs tests getJobs APIs should get a list of jobs from getJobsCommon Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -239,6 +265,8 @@ Array [ }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -259,6 +287,8 @@ exports[`GetJobs tests getJobs APIs should get a list of jobs from getJobsCommon Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -274,6 +304,8 @@ Array [ }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -294,6 +326,8 @@ exports[`GetJobs tests getJobs APIs should get jobs by owner 1`] = ` Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -309,6 +343,8 @@ Array [ }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -329,6 +365,8 @@ exports[`GetJobs tests getJobs APIs should get jobs by owner and prefix 1`] = ` Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -344,6 +382,8 @@ Array [ }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -364,6 +404,8 @@ exports[`GetJobs tests getJobs APIs should get jobs by prefix 1`] = ` Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -379,6 +421,8 @@ Array [ }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -416,6 +460,8 @@ exports[`GetJobs tests getJobs APIs should have proper URI when using status 1`] exports[`GetJobs tests getJobs APIs should locate a job by jobid 1`] = ` Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -445,6 +491,8 @@ exports[`GetJobs tests getJobsByParameters should get jobs even when no params a Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -460,6 +508,8 @@ Array [ }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -480,6 +530,8 @@ exports[`GetJobs tests getJobsByParameters should get jobs when any of the valid Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -495,6 +547,8 @@ Array [ }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -693,6 +747,8 @@ exports[`GetJobs tests getSpoolFiles APIs should have proper URI when getting sp exports[`GetJobs tests getStatus APIs should get a job via getStatus and getStatusCommon 1`] = ` Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -711,6 +767,8 @@ Object { exports[`GetJobs tests getStatus APIs should get a job via getStatus and getStatusCommon 2`] = ` Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", diff --git a/packages/zosjobs/src/GetJobs.ts b/packages/zosjobs/src/GetJobs.ts index 5cefdfc953..42e52589fd 100644 --- a/packages/zosjobs/src/GetJobs.ts +++ b/packages/zosjobs/src/GetJobs.ts @@ -153,6 +153,7 @@ export class GetJobs { Logger.getAppLogger().trace("GetJobs.getJobsCommon()"); ImperativeExpect.toNotBeNullOrUndefined(session, "Required session must be defined"); let query = JobsConstants.QUERY_ID; + params.execData = true; // always returning start and end time data if (params) { if (params.owner) { diff --git a/packages/zosjobs/src/doc/response/IJob.ts b/packages/zosjobs/src/doc/response/IJob.ts index 46e00be949..5ddfdf0bcf 100644 --- a/packages/zosjobs/src/doc/response/IJob.ts +++ b/packages/zosjobs/src/doc/response/IJob.ts @@ -34,6 +34,20 @@ export interface IJob { */ jobname: string; + /** + * start date of the job + * @type {Date} + * @memberof IJob + */ + "exec-started": string; + + /** + * end date of the job + * @type {Date} + * @memberof IJob + */ + "exec-ended": string; + /** * The primary or secondary JES subsystem. * If this value is null, the job was processed by the primary subsystem. From 1925533dc3961e7691fc886bad742b6d25ab7fc8 Mon Sep 17 00:00:00 2001 From: Pujal Date: Wed, 23 Oct 2024 15:51:42 -0400 Subject: [PATCH 02/11] updated the changelog Signed-off-by: Pujal --- packages/zosjobs/CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/zosjobs/CHANGELOG.md b/packages/zosjobs/CHANGELOG.md index 899dbad608..19a20c38ec 100644 --- a/packages/zosjobs/CHANGELOG.md +++ b/packages/zosjobs/CHANGELOG.md @@ -2,6 +2,9 @@ All notable changes to the Zowe z/OS jobs SDK package will be documented in this file. +## Recent Changes +- Enhancement: Added "exec-started" and "exec-ended" to IJob return data from GetJobs.getJob [#2320](https://github.com/zowe/zowe-cli/pull/2320) + ## `8.1.1` - BugFix: Updated peer dependencies to `^8.0.0`, dropping support for versions tagged `next`. [#2287](https://github.com/zowe/zowe-cli/pull/2287) From e2f2b254efd4bbc2eeca4fc7accdb4110448904a Mon Sep 17 00:00:00 2001 From: Pujal Date: Wed, 23 Oct 2024 15:55:59 -0400 Subject: [PATCH 03/11] linting issues fixed Signed-off-by: Pujal --- .../__tests__/__resources__/api/GetJobsData.ts | 6 +++--- .../zosjobs/__tests__/__unit__/GetJobs.unit.test.ts | 12 ++++++------ packages/zosjobs/src/GetJobs.ts | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts b/packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts index 6ff94b39b9..a9cf78e74c 100644 --- a/packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts +++ b/packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts @@ -29,7 +29,7 @@ export class GetJobsData { public static readonly SAMPLE_COMPLETE_JOB: IJob = { "jobid": "TSUxxx", "jobname": "IBMUSER$", - "exec-started": '2024-01-02T15:57:58.350Z', + "exec-started": '2024-01-02T15:57:58.350Z', "exec-ended": '2024-01-02T15:58:00.600Z', "subsystem": "JES2", "owner": "IBMUSER", @@ -53,7 +53,7 @@ export class GetJobsData { public static readonly SAMPLE_COMPLETE_JOB_AGAIN: IJob = { "jobid": "JOBxxx", "jobname": "CAUSER$", - "exec-started": '2024-01-02T15:57:58.350Z', + "exec-started": '2024-01-02T15:57:58.350Z', "exec-ended": '2024-01-02T15:58:00.600Z', "subsystem": "JES2", "owner": "CAUSER", @@ -85,7 +85,7 @@ export class GetJobsData { public static readonly SAMPLE_ACTIVE_JOB: IJob = { "retcode": null, "jobname": "IBMUSER$", - "exec-started": '2024-01-02T15:57:58.350Z', + "exec-started": '2024-01-02T15:57:58.350Z', "exec-ended": '2024-01-02T15:58:00.600Z', "status": "INPUT", "job-correlator": "J0003781USILDAMDD3CE8146.......:", diff --git a/packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts b/packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts index 232d1b984f..1c8b941cb1 100644 --- a/packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts +++ b/packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts @@ -597,7 +597,7 @@ describe("GetJobs tests", () => { class: 'c', retcode: 'r', url: '', 'files-url': '', 'job-correlator': '', phase: 1, 'phase-name': 'name', 'reason-not-running': 'no', - 'exec-started': '2024-01-02T15:57:58.350Z', + 'exec-started': '2024-01-02T15:57:58.350Z', 'exec-ended': '2024-01-02T15:58:00.600Z' }, { @@ -605,8 +605,8 @@ describe("GetJobs tests", () => { owner: 'zowe', status: 'Output', type: 't', class: 'c', retcode: 'r', url: '', 'files-url': '', 'job-correlator': '', - phase: 1, 'phase-name': 'name', 'reason-not-running': 'no', - 'exec-started': '2024-01-02T15:57:58.350Z', + phase: 1, 'phase-name': 'name', 'reason-not-running': 'no', + 'exec-started': '2024-01-02T15:57:58.350Z', 'exec-ended': '2024-01-02T15:58:00.600Z' }, { @@ -615,7 +615,7 @@ describe("GetJobs tests", () => { class: 'c', retcode: 'r', url: '', 'files-url': '', 'job-correlator': '', phase: 1, 'phase-name': 'name', 'reason-not-running': 'no', - 'exec-started': '2024-01-02T15:57:58.350Z', + 'exec-started': '2024-01-02T15:57:58.350Z', 'exec-ended': '2024-01-02T15:58:00.600Z' } @@ -627,7 +627,7 @@ describe("GetJobs tests", () => { class: 'c', retcode: 'r', url: '', 'files-url': '', 'job-correlator': '', phase: 1, 'phase-name': 'name', 'reason-not-running': 'no', - 'exec-started': '2024-01-02T15:57:58.350Z', + 'exec-started': '2024-01-02T15:57:58.350Z', 'exec-ended': '2024-01-02T15:58:00.600Z' }, { @@ -636,7 +636,7 @@ describe("GetJobs tests", () => { class: 'c', retcode: 'r', url: '', 'files-url': '', 'job-correlator': '', phase: 1, 'phase-name': 'name', 'reason-not-running': 'no', - 'exec-started': '2024-01-02T15:57:58.350Z', + 'exec-started': '2024-01-02T15:57:58.350Z', 'exec-ended': '2024-01-02T15:58:00.600Z' } ]; diff --git a/packages/zosjobs/src/GetJobs.ts b/packages/zosjobs/src/GetJobs.ts index 42e52589fd..ff20d355c6 100644 --- a/packages/zosjobs/src/GetJobs.ts +++ b/packages/zosjobs/src/GetJobs.ts @@ -153,7 +153,7 @@ export class GetJobs { Logger.getAppLogger().trace("GetJobs.getJobsCommon()"); ImperativeExpect.toNotBeNullOrUndefined(session, "Required session must be defined"); let query = JobsConstants.QUERY_ID; - params.execData = true; // always returning start and end time data + params.execData = true; // always returning start and end time data if (params) { if (params.owner) { From 6c08a008173e7f074cc45a092f7bc60c3c45962c Mon Sep 17 00:00:00 2001 From: Pujal Date: Thu, 24 Oct 2024 10:41:18 -0400 Subject: [PATCH 04/11] updated unit tests sample jobs Signed-off-by: Pujal --- .../zosjobs/__resources__/GetJobsData.ts | 6 ++++ .../Job.handler.unit.test.ts.snap | 4 +++ .../Job.handler.unit.test.ts.snap | 4 +++ .../OldJobs.handler.unit.test.ts.snap | 32 +++++++++++++++++++ .../Jobs.handler.unit.test.ts.snap | 24 ++++++++++++++ .../modify/job/Job.handler.unit.test.ts | 2 ++ ...JobStatusByJobid.handler.unit.test.ts.snap | 4 +++ .../__unit__/CancelJobs.unit.test.ts | 4 ++- .../__unit__/DeleteJobs.unit.test.ts | 2 ++ .../__unit__/SubmitJobs.unit.test.ts | 3 ++ packages/zosjobs/src/GetJobs.ts | 2 +- 11 files changed, 85 insertions(+), 2 deletions(-) diff --git a/packages/cli/__tests__/zosjobs/__resources__/GetJobsData.ts b/packages/cli/__tests__/zosjobs/__resources__/GetJobsData.ts index 56a1fe3f59..ac4ea88163 100644 --- a/packages/cli/__tests__/zosjobs/__resources__/GetJobsData.ts +++ b/packages/cli/__tests__/zosjobs/__resources__/GetJobsData.ts @@ -27,6 +27,8 @@ export class GetJobsData { public static readonly SAMPLE_COMPLETE_JOB: IJob = { "jobid": "TSUxxx", "jobname": "IBMUSER$", + "exec-started": '2024-01-02T15:57:58.350Z', + "exec-ended": '2024-01-02T15:58:00.600Z', "subsystem": "JES2", "owner": "IBMUSER", "status": "OUTPUT", @@ -49,6 +51,8 @@ export class GetJobsData { public static readonly SAMPLE_COMPLETE_JOB_AGAIN: IJob = { "jobid": "JOBxxx", "jobname": "CAUSER$", + "exec-started": '2024-01-02T15:57:58.350Z', + "exec-ended": '2024-01-02T15:58:00.600Z', "subsystem": "JES2", "owner": "CAUSER", "status": "OUTPUT", @@ -79,6 +83,8 @@ export class GetJobsData { public static readonly SAMPLE_ACTIVE_JOB: IJob = { "retcode": null, "jobname": "KELDA16$", + "exec-started": '2024-01-02T15:57:58.350Z', + "exec-ended": '2024-01-02T15:58:00.600Z', "status": "INPUT", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "class": "A", diff --git a/packages/cli/__tests__/zosjobs/__unit__/cancel/job/__snapshots__/Job.handler.unit.test.ts.snap b/packages/cli/__tests__/zosjobs/__unit__/cancel/job/__snapshots__/Job.handler.unit.test.ts.snap index a2ca50e52b..b0305e5ab1 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/cancel/job/__snapshots__/Job.handler.unit.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__unit__/cancel/job/__snapshots__/Job.handler.unit.test.ts.snap @@ -7,6 +7,8 @@ exports[`cancel job handler tests should be able to cancel a job by job id 2`] = exports[`cancel job handler tests should be able to cancel a job by job id 3`] = ` Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -29,6 +31,8 @@ exports[`cancel job handler tests should be able to cancel a job by job id versi exports[`cancel job handler tests should be able to cancel a job by job id version 2.0 3`] = ` Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", diff --git a/packages/cli/__tests__/zosjobs/__unit__/delete/job/__snapshots__/Job.handler.unit.test.ts.snap b/packages/cli/__tests__/zosjobs/__unit__/delete/job/__snapshots__/Job.handler.unit.test.ts.snap index 520ed858b3..45ea1c2358 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/delete/job/__snapshots__/Job.handler.unit.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__unit__/delete/job/__snapshots__/Job.handler.unit.test.ts.snap @@ -7,6 +7,8 @@ exports[`delete job handler tests should be able to delete a job by job id 2`] = exports[`delete job handler tests should be able to delete a job by job id 3`] = ` Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -29,6 +31,8 @@ exports[`delete job handler tests should be able to delete a job by job id versi exports[`delete job handler tests should be able to delete a job by job id version 2.0 3`] = ` Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", diff --git a/packages/cli/__tests__/zosjobs/__unit__/delete/old-jobs/__snapshots__/OldJobs.handler.unit.test.ts.snap b/packages/cli/__tests__/zosjobs/__unit__/delete/old-jobs/__snapshots__/OldJobs.handler.unit.test.ts.snap index 5a8b586a63..4cd83b11c3 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/delete/old-jobs/__snapshots__/OldJobs.handler.unit.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__unit__/delete/old-jobs/__snapshots__/OldJobs.handler.unit.test.ts.snap @@ -13,6 +13,8 @@ Object { "output": Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -28,6 +30,8 @@ Object { }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -51,6 +55,8 @@ exports[`delete old-jobs handler tests should delete all jobs using defaults in Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -66,6 +72,8 @@ Array [ }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -95,6 +103,8 @@ Object { "output": Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -110,6 +120,8 @@ Object { }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -133,6 +145,8 @@ exports[`delete old-jobs handler tests should delete all jobs using defaults seq Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -148,6 +162,8 @@ Array [ }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -177,6 +193,8 @@ Object { "output": Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -192,6 +210,8 @@ Object { }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -215,6 +235,8 @@ exports[`delete old-jobs handler tests should delete jobs with a specific prefix Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -230,6 +252,8 @@ Array [ }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -259,6 +283,8 @@ Object { "output": Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -274,6 +300,8 @@ Object { }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -297,6 +325,8 @@ exports[`delete old-jobs handler tests should delete jobs with modifyVersion 2.0 Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -312,6 +342,8 @@ Array [ }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", diff --git a/packages/cli/__tests__/zosjobs/__unit__/list/jobs/__snapshots__/Jobs.handler.unit.test.ts.snap b/packages/cli/__tests__/zosjobs/__unit__/list/jobs/__snapshots__/Jobs.handler.unit.test.ts.snap index a1b05c64c4..1a05549051 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/list/jobs/__snapshots__/Jobs.handler.unit.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__unit__/list/jobs/__snapshots__/Jobs.handler.unit.test.ts.snap @@ -4,6 +4,8 @@ exports[`list jobs handler tests should be able to get a list of jobs for a spec Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -19,6 +21,8 @@ Array [ }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -49,6 +53,8 @@ Object { "output": Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -64,6 +70,8 @@ Object { }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -85,6 +93,8 @@ exports[`list jobs handler tests should be able to get a list of jobs for a spec Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -100,6 +110,8 @@ Array [ }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -130,6 +142,8 @@ Object { "output": Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -145,6 +159,8 @@ Object { }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -166,6 +182,8 @@ exports[`list jobs handler tests should be able to get a list of jobs using defa Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -181,6 +199,8 @@ Array [ }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -211,6 +231,8 @@ Object { "output": Array [ Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -226,6 +248,8 @@ Object { }, Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", diff --git a/packages/cli/__tests__/zosjobs/__unit__/modify/job/Job.handler.unit.test.ts b/packages/cli/__tests__/zosjobs/__unit__/modify/job/Job.handler.unit.test.ts index b703740e85..48f39b426a 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/modify/job/Job.handler.unit.test.ts +++ b/packages/cli/__tests__/zosjobs/__unit__/modify/job/Job.handler.unit.test.ts @@ -39,6 +39,8 @@ const SAMPLE_COMPLETE_JOB: IJob= { "subsystem": "JES2", "type": "JOB", "url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A", + "exec-started": '2024-01-02T15:57:58.350Z', + "exec-ended": '2024-01-02T15:58:00.600Z', }; const SUCCESS_FEEDBACK: IJobFeedback = { diff --git a/packages/cli/__tests__/zosjobs/__unit__/view/job/__snapshots__/JobStatusByJobid.handler.unit.test.ts.snap b/packages/cli/__tests__/zosjobs/__unit__/view/job/__snapshots__/JobStatusByJobid.handler.unit.test.ts.snap index c41d29f992..dc0a0152cc 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/view/job/__snapshots__/JobStatusByJobid.handler.unit.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__unit__/view/job/__snapshots__/JobStatusByJobid.handler.unit.test.ts.snap @@ -5,6 +5,8 @@ exports[`view job-status-by-jobid handler tests should be able respond with erro exports[`view job-status-by-jobid handler tests should be able to get a job 1`] = ` Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -33,6 +35,8 @@ Object { "format": "object", "output": Object { "class": "A", + "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-started": "2024-01-02T15:57:58.350Z", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", diff --git a/packages/zosjobs/__tests__/__unit__/CancelJobs.unit.test.ts b/packages/zosjobs/__tests__/__unit__/CancelJobs.unit.test.ts index 8d19923dc9..a5f134c171 100644 --- a/packages/zosjobs/__tests__/__unit__/CancelJobs.unit.test.ts +++ b/packages/zosjobs/__tests__/__unit__/CancelJobs.unit.test.ts @@ -40,7 +40,9 @@ describe("Cancel Jobs unit tests", () => { "files-url": "myfakeurl.com/files/records", "phase": 2, "phase-name": "OUTPUT", - "job-correlator": "mycorrelator" + "job-correlator": "mycorrelator", + "exec-started": '2024-01-02T15:57:58.350Z', + "exec-ended": '2024-01-02T15:58:00.600Z', }; describe("Positive tests", () => { it("should allow users to call cancelJob with correct parameters", async () => { diff --git a/packages/zosjobs/__tests__/__unit__/DeleteJobs.unit.test.ts b/packages/zosjobs/__tests__/__unit__/DeleteJobs.unit.test.ts index c28a5c0015..761d14f0d6 100644 --- a/packages/zosjobs/__tests__/__unit__/DeleteJobs.unit.test.ts +++ b/packages/zosjobs/__tests__/__unit__/DeleteJobs.unit.test.ts @@ -31,6 +31,8 @@ describe("Delete Jobs unit tests", () => { const fakeJob: IJob = { "jobid": "JOB00001", "jobname": "MYJOB1", + "exec-started": '2024-01-02T15:57:58.350Z', + "exec-ended": '2024-01-02T15:58:00.600Z', "retcode": "CC 0000", "owner": "dummy", "subsystem": "JES2", diff --git a/packages/zosjobs/__tests__/__unit__/SubmitJobs.unit.test.ts b/packages/zosjobs/__tests__/__unit__/SubmitJobs.unit.test.ts index 55d6257d1c..74c5a8c189 100644 --- a/packages/zosjobs/__tests__/__unit__/SubmitJobs.unit.test.ts +++ b/packages/zosjobs/__tests__/__unit__/SubmitJobs.unit.test.ts @@ -27,6 +27,7 @@ const expectedMockSpoolContent = "Hello! This is my spool content."; const jobFiles: IJobFile[] = [{ "jobid": fakeJobID, "jobname": fakeJobName, + "id": 0, "recfm": "FB", "lrecl": 80, @@ -44,6 +45,8 @@ const sampleJob: IJob = { "jobid": fakeJobID, "jobname": fakeJobName, "subsystem": "JES2", + "exec-started": '2024-01-02T15:57:58.350Z', + "exec-ended": '2024-01-02T15:58:00.600Z', "owner": "IBMUSER", "status": "OUTPUT", "type": "job", diff --git a/packages/zosjobs/src/GetJobs.ts b/packages/zosjobs/src/GetJobs.ts index ff20d355c6..172f6770f0 100644 --- a/packages/zosjobs/src/GetJobs.ts +++ b/packages/zosjobs/src/GetJobs.ts @@ -153,7 +153,7 @@ export class GetJobs { Logger.getAppLogger().trace("GetJobs.getJobsCommon()"); ImperativeExpect.toNotBeNullOrUndefined(session, "Required session must be defined"); let query = JobsConstants.QUERY_ID; - params.execData = true; // always returning start and end time data + // params.execData = true; // always returning start and end time data if (params) { if (params.owner) { From cec51f4070935f3e2c1a23882e31fd200bc21d42 Mon Sep 17 00:00:00 2001 From: Pujal Date: Thu, 24 Oct 2024 11:58:49 -0400 Subject: [PATCH 05/11] updated code Signed-off-by: Pujal --- packages/zosjobs/src/GetJobs.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/zosjobs/src/GetJobs.ts b/packages/zosjobs/src/GetJobs.ts index 172f6770f0..b220afb240 100644 --- a/packages/zosjobs/src/GetJobs.ts +++ b/packages/zosjobs/src/GetJobs.ts @@ -108,7 +108,7 @@ export class GetJobs { ImperativeExpect.toBeDefinedAndNonBlank(jobid, "jobid"); ImperativeExpect.toNotBeNullOrUndefined(session, "Required session must be defined"); const jobs = await GetJobs.getJobsCommon(session, { jobid, owner: "*" }); - + const userMsg: string = "Cannot obtain job info for job id = " + jobid; const diagInfo: string = "Protocol: " + session.ISession.protocol + @@ -153,7 +153,7 @@ export class GetJobs { Logger.getAppLogger().trace("GetJobs.getJobsCommon()"); ImperativeExpect.toNotBeNullOrUndefined(session, "Required session must be defined"); let query = JobsConstants.QUERY_ID; - // params.execData = true; // always returning start and end time data + let includeExecData = params?.execData != false; if (params) { if (params.owner) { @@ -181,7 +181,7 @@ export class GetJobs { } query += JobsConstants.QUERY_JOBID + encodeURIComponent(params.jobid); } - if (params.execData) { + if (includeExecData) { if (RestClient.hasQueryString(query)) { query += JobsConstants.COMBO_ID; } From fc488da6c7397fbcd1d2328b45fa5819d48c986f Mon Sep 17 00:00:00 2001 From: Pujal Date: Thu, 24 Oct 2024 12:22:43 -0400 Subject: [PATCH 06/11] fixed linting errors Signed-off-by: Pujal --- .../test_plugins/override_plugin/package.json | 2 +- .../__tests__/__unit__/SubmitJobs.unit.test.ts | 2 +- .../__snapshots__/GetJobs.unit.test.ts.snap | 18 +++++++++--------- packages/zosjobs/src/GetJobs.ts | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/package.json index 8851951c26..8a0fb0e246 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/package.json @@ -1,5 +1,5 @@ { - "name": "override-plugin", + "name": "@zowe/secrets-for-kubernetes-for-zowe-cli", "version": "1.0.1", "description": "Some description", "main": "lib/index.js", diff --git a/packages/zosjobs/__tests__/__unit__/SubmitJobs.unit.test.ts b/packages/zosjobs/__tests__/__unit__/SubmitJobs.unit.test.ts index 74c5a8c189..0b03de6bda 100644 --- a/packages/zosjobs/__tests__/__unit__/SubmitJobs.unit.test.ts +++ b/packages/zosjobs/__tests__/__unit__/SubmitJobs.unit.test.ts @@ -27,7 +27,7 @@ const expectedMockSpoolContent = "Hello! This is my spool content."; const jobFiles: IJobFile[] = [{ "jobid": fakeJobID, "jobname": fakeJobName, - + "id": 0, "recfm": "FB", "lrecl": 80, diff --git a/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap b/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap index 707755244a..2d849555e1 100644 --- a/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap +++ b/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap @@ -439,23 +439,23 @@ Array [ ] `; -exports[`GetJobs tests getJobs APIs should have proper URI when using all parms 1`] = `"/zosmf/restjobs/jobs?owner=fakeOwner&prefix=fakePrefix&max-jobs=2&jobid=fakeID"`; +exports[`GetJobs tests getJobs APIs should have proper URI when using all parms 1`] = `"/zosmf/restjobs/jobs?owner=fakeOwner&prefix=fakePrefix&max-jobs=2&jobid=fakeID&exec-data=Y"`; -exports[`GetJobs tests getJobs APIs should have proper URI when using jobid 1`] = `"/zosmf/restjobs/jobs?jobid=fakeJobid"`; +exports[`GetJobs tests getJobs APIs should have proper URI when using jobid 1`] = `"/zosmf/restjobs/jobs?jobid=fakeJobid&exec-data=Y"`; -exports[`GetJobs tests getJobs APIs should have proper URI when using jobname and jobid 1`] = `"/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix"`; +exports[`GetJobs tests getJobs APIs should have proper URI when using jobname and jobid 1`] = `"/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&exec-data=Y"`; -exports[`GetJobs tests getJobs APIs should have proper URI when using jobname, prefix, and jobid 1`] = `"/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&jobid=fakeJobid"`; +exports[`GetJobs tests getJobs APIs should have proper URI when using jobname, prefix, and jobid 1`] = `"/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&jobid=fakeJobid&exec-data=Y"`; -exports[`GetJobs tests getJobs APIs should have proper URI when using maxjobs 1`] = `"/zosmf/restjobs/jobs?max-jobs=10"`; +exports[`GetJobs tests getJobs APIs should have proper URI when using maxjobs 1`] = `"/zosmf/restjobs/jobs?max-jobs=10&exec-data=Y"`; -exports[`GetJobs tests getJobs APIs should have proper URI when using no parms 1`] = `"/zosmf/restjobs/jobs"`; +exports[`GetJobs tests getJobs APIs should have proper URI when using no parms 1`] = `"/zosmf/restjobs/jobs?exec-data=Y"`; -exports[`GetJobs tests getJobs APIs should have proper URI when using owner 1`] = `"/zosmf/restjobs/jobs?owner=fakeOwner"`; +exports[`GetJobs tests getJobs APIs should have proper URI when using owner 1`] = `"/zosmf/restjobs/jobs?owner=fakeOwner&exec-data=Y"`; -exports[`GetJobs tests getJobs APIs should have proper URI when using prefix 1`] = `"/zosmf/restjobs/jobs?prefix=fakePrefix"`; +exports[`GetJobs tests getJobs APIs should have proper URI when using prefix 1`] = `"/zosmf/restjobs/jobs?prefix=fakePrefix&exec-data=Y"`; -exports[`GetJobs tests getJobs APIs should have proper URI when using status 1`] = `"/zosmf/restjobs/jobs?status=active"`; +exports[`GetJobs tests getJobs APIs should have proper URI when using status 1`] = `"/zosmf/restjobs/jobs?exec-data=Y&status=active"`; exports[`GetJobs tests getJobs APIs should locate a job by jobid 1`] = ` Object { diff --git a/packages/zosjobs/src/GetJobs.ts b/packages/zosjobs/src/GetJobs.ts index b220afb240..5ff8cb142a 100644 --- a/packages/zosjobs/src/GetJobs.ts +++ b/packages/zosjobs/src/GetJobs.ts @@ -108,7 +108,7 @@ export class GetJobs { ImperativeExpect.toBeDefinedAndNonBlank(jobid, "jobid"); ImperativeExpect.toNotBeNullOrUndefined(session, "Required session must be defined"); const jobs = await GetJobs.getJobsCommon(session, { jobid, owner: "*" }); - + const userMsg: string = "Cannot obtain job info for job id = " + jobid; const diagInfo: string = "Protocol: " + session.ISession.protocol + @@ -153,7 +153,7 @@ export class GetJobs { Logger.getAppLogger().trace("GetJobs.getJobsCommon()"); ImperativeExpect.toNotBeNullOrUndefined(session, "Required session must be defined"); let query = JobsConstants.QUERY_ID; - let includeExecData = params?.execData != false; + const includeExecData = params?.execData != false; if (params) { if (params.owner) { From c8cf9eedbae1c3f6e572930cf848d00252c35000 Mon Sep 17 00:00:00 2001 From: Pujal Date: Thu, 24 Oct 2024 15:51:50 -0400 Subject: [PATCH 07/11] updated code with PR comments Signed-off-by: Pujal --- .../zosjobs/__resources__/GetJobsData.ts | 9 ++ .../Job.handler.unit.test.ts.snap | 6 ++ .../Job.handler.unit.test.ts.snap | 6 ++ .../OldJobs.handler.unit.test.ts.snap | 48 ++++++++++ .../Jobs.handler.unit.test.ts.snap | 36 ++++++++ .../modify/job/Job.handler.unit.test.ts | 3 + ...JobStatusByJobid.handler.unit.test.ts.snap | 6 ++ packages/zosjobs/CHANGELOG.md | 2 +- .../__resources__/api/GetJobsData.ts | 9 ++ .../__unit__/CancelJobs.unit.test.ts | 3 + .../__unit__/DeleteJobs.unit.test.ts | 5 +- .../__tests__/__unit__/GetJobs.unit.test.ts | 25 ++++-- .../__unit__/SubmitJobs.unit.test.ts | 3 + .../__snapshots__/GetJobs.unit.test.ts.snap | 87 +++++++++++++++++++ packages/zosjobs/src/GetJobs.ts | 2 +- packages/zosjobs/src/doc/response/IJob.ts | 21 +++++ 16 files changed, 263 insertions(+), 8 deletions(-) diff --git a/packages/cli/__tests__/zosjobs/__resources__/GetJobsData.ts b/packages/cli/__tests__/zosjobs/__resources__/GetJobsData.ts index ac4ea88163..1bb395ed13 100644 --- a/packages/cli/__tests__/zosjobs/__resources__/GetJobsData.ts +++ b/packages/cli/__tests__/zosjobs/__resources__/GetJobsData.ts @@ -29,6 +29,9 @@ export class GetJobsData { "jobname": "IBMUSER$", "exec-started": '2024-01-02T15:57:58.350Z', "exec-ended": '2024-01-02T15:58:00.600Z', + "exec-member": 'SYS1', + "exec-system": 'SYS1', + "exec-submitted": '2024-01-02T15:58:00.600Z', "subsystem": "JES2", "owner": "IBMUSER", "status": "OUTPUT", @@ -53,6 +56,9 @@ export class GetJobsData { "jobname": "CAUSER$", "exec-started": '2024-01-02T15:57:58.350Z', "exec-ended": '2024-01-02T15:58:00.600Z', + "exec-member": 'SYS1', + "exec-system": 'SYS1', + "exec-submitted": '2024-01-02T15:58:00.600Z', "subsystem": "JES2", "owner": "CAUSER", "status": "OUTPUT", @@ -85,6 +91,9 @@ export class GetJobsData { "jobname": "KELDA16$", "exec-started": '2024-01-02T15:57:58.350Z', "exec-ended": '2024-01-02T15:58:00.600Z', + "exec-member": 'SYS1', + "exec-system": 'SYS1', + "exec-submitted": '2024-01-02T15:58:00.600Z', "status": "INPUT", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "class": "A", diff --git a/packages/cli/__tests__/zosjobs/__unit__/cancel/job/__snapshots__/Job.handler.unit.test.ts.snap b/packages/cli/__tests__/zosjobs/__unit__/cancel/job/__snapshots__/Job.handler.unit.test.ts.snap index b0305e5ab1..14675179cb 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/cancel/job/__snapshots__/Job.handler.unit.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__unit__/cancel/job/__snapshots__/Job.handler.unit.test.ts.snap @@ -8,7 +8,10 @@ exports[`cancel job handler tests should be able to cancel a job by job id 3`] = Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -32,7 +35,10 @@ exports[`cancel job handler tests should be able to cancel a job by job id versi Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", diff --git a/packages/cli/__tests__/zosjobs/__unit__/delete/job/__snapshots__/Job.handler.unit.test.ts.snap b/packages/cli/__tests__/zosjobs/__unit__/delete/job/__snapshots__/Job.handler.unit.test.ts.snap index 45ea1c2358..240d19e4d6 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/delete/job/__snapshots__/Job.handler.unit.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__unit__/delete/job/__snapshots__/Job.handler.unit.test.ts.snap @@ -8,7 +8,10 @@ exports[`delete job handler tests should be able to delete a job by job id 3`] = Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -32,7 +35,10 @@ exports[`delete job handler tests should be able to delete a job by job id versi Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", diff --git a/packages/cli/__tests__/zosjobs/__unit__/delete/old-jobs/__snapshots__/OldJobs.handler.unit.test.ts.snap b/packages/cli/__tests__/zosjobs/__unit__/delete/old-jobs/__snapshots__/OldJobs.handler.unit.test.ts.snap index 4cd83b11c3..3a0dd3c904 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/delete/old-jobs/__snapshots__/OldJobs.handler.unit.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__unit__/delete/old-jobs/__snapshots__/OldJobs.handler.unit.test.ts.snap @@ -14,7 +14,10 @@ Object { Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -31,7 +34,10 @@ Object { Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -56,7 +62,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -73,7 +82,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -104,7 +116,10 @@ Object { Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -121,7 +136,10 @@ Object { Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -146,7 +164,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -163,7 +184,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -194,7 +218,10 @@ Object { Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -211,7 +238,10 @@ Object { Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -236,7 +266,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -253,7 +286,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -284,7 +320,10 @@ Object { Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -301,7 +340,10 @@ Object { Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -326,7 +368,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -343,7 +388,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", diff --git a/packages/cli/__tests__/zosjobs/__unit__/list/jobs/__snapshots__/Jobs.handler.unit.test.ts.snap b/packages/cli/__tests__/zosjobs/__unit__/list/jobs/__snapshots__/Jobs.handler.unit.test.ts.snap index 1a05549051..21f22a85a1 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/list/jobs/__snapshots__/Jobs.handler.unit.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__unit__/list/jobs/__snapshots__/Jobs.handler.unit.test.ts.snap @@ -5,7 +5,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -22,7 +25,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -54,7 +60,10 @@ Object { Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -71,7 +80,10 @@ Object { Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -94,7 +106,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -111,7 +126,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -143,7 +161,10 @@ Object { Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -160,7 +181,10 @@ Object { Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -183,7 +207,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -200,7 +227,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", @@ -232,7 +262,10 @@ Object { Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -249,7 +282,10 @@ Object { Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "JOBxxx", diff --git a/packages/cli/__tests__/zosjobs/__unit__/modify/job/Job.handler.unit.test.ts b/packages/cli/__tests__/zosjobs/__unit__/modify/job/Job.handler.unit.test.ts index 48f39b426a..afe417b4ee 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/modify/job/Job.handler.unit.test.ts +++ b/packages/cli/__tests__/zosjobs/__unit__/modify/job/Job.handler.unit.test.ts @@ -41,6 +41,9 @@ const SAMPLE_COMPLETE_JOB: IJob= { "url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A", "exec-started": '2024-01-02T15:57:58.350Z', "exec-ended": '2024-01-02T15:58:00.600Z', + "exec-member": 'SYS1', + "exec-system": 'SYS1', + "exec-submitted": '2024-01-02T15:58:00.600Z' }; const SUCCESS_FEEDBACK: IJobFeedback = { diff --git a/packages/cli/__tests__/zosjobs/__unit__/view/job/__snapshots__/JobStatusByJobid.handler.unit.test.ts.snap b/packages/cli/__tests__/zosjobs/__unit__/view/job/__snapshots__/JobStatusByJobid.handler.unit.test.ts.snap index dc0a0152cc..a9e6fb30eb 100644 --- a/packages/cli/__tests__/zosjobs/__unit__/view/job/__snapshots__/JobStatusByJobid.handler.unit.test.ts.snap +++ b/packages/cli/__tests__/zosjobs/__unit__/view/job/__snapshots__/JobStatusByJobid.handler.unit.test.ts.snap @@ -6,7 +6,10 @@ exports[`view job-status-by-jobid handler tests should be able to get a job 1`] Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -36,7 +39,10 @@ Object { "output": Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", diff --git a/packages/zosjobs/CHANGELOG.md b/packages/zosjobs/CHANGELOG.md index 19a20c38ec..efed2c155e 100644 --- a/packages/zosjobs/CHANGELOG.md +++ b/packages/zosjobs/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to the Zowe z/OS jobs SDK package will be documented in this file. ## Recent Changes -- Enhancement: Added "exec-started" and "exec-ended" to IJob return data from GetJobs.getJob [#2320](https://github.com/zowe/zowe-cli/pull/2320) +- Enhancement: Added execData to IJob return data from GetJobs.getJob [#2320](https://github.com/zowe/zowe-cli/pull/2320) ## `8.1.1` diff --git a/packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts b/packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts index a9cf78e74c..fb58d21b0d 100644 --- a/packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts +++ b/packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts @@ -31,6 +31,9 @@ export class GetJobsData { "jobname": "IBMUSER$", "exec-started": '2024-01-02T15:57:58.350Z', "exec-ended": '2024-01-02T15:58:00.600Z', + "exec-submitted": '2024-01-02T15:58:00.600Z', + "exec-member": 'DE20', + "exec-system": 'DE20', "subsystem": "JES2", "owner": "IBMUSER", "status": "OUTPUT", @@ -55,6 +58,9 @@ export class GetJobsData { "jobname": "CAUSER$", "exec-started": '2024-01-02T15:57:58.350Z', "exec-ended": '2024-01-02T15:58:00.600Z', + "exec-submitted": '2024-01-02T15:58:00.600Z', + "exec-member": 'DE20', + "exec-system": 'DE20', "subsystem": "JES2", "owner": "CAUSER", "status": "OUTPUT", @@ -87,6 +93,9 @@ export class GetJobsData { "jobname": "IBMUSER$", "exec-started": '2024-01-02T15:57:58.350Z', "exec-ended": '2024-01-02T15:58:00.600Z', + "exec-submitted": '2024-01-02T15:58:00.600Z', + "exec-member": 'DE20', + "exec-system": 'DE20', "status": "INPUT", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "class": "A", diff --git a/packages/zosjobs/__tests__/__unit__/CancelJobs.unit.test.ts b/packages/zosjobs/__tests__/__unit__/CancelJobs.unit.test.ts index a5f134c171..655555e852 100644 --- a/packages/zosjobs/__tests__/__unit__/CancelJobs.unit.test.ts +++ b/packages/zosjobs/__tests__/__unit__/CancelJobs.unit.test.ts @@ -43,6 +43,9 @@ describe("Cancel Jobs unit tests", () => { "job-correlator": "mycorrelator", "exec-started": '2024-01-02T15:57:58.350Z', "exec-ended": '2024-01-02T15:58:00.600Z', + "exec-member": 'SYS1', + "exec-system": 'SYS1', + "exec-submitted": '2024-01-02T15:58:00.600Z' }; describe("Positive tests", () => { it("should allow users to call cancelJob with correct parameters", async () => { diff --git a/packages/zosjobs/__tests__/__unit__/DeleteJobs.unit.test.ts b/packages/zosjobs/__tests__/__unit__/DeleteJobs.unit.test.ts index 761d14f0d6..d6bf063145 100644 --- a/packages/zosjobs/__tests__/__unit__/DeleteJobs.unit.test.ts +++ b/packages/zosjobs/__tests__/__unit__/DeleteJobs.unit.test.ts @@ -43,7 +43,10 @@ describe("Delete Jobs unit tests", () => { "files-url": "myfakeurl.com/files/records", "phase": 2, "phase-name": "OUTPUT", - "job-correlator": "mycorrelator" + "job-correlator": "mycorrelator", + "exec-member": 'SYS1', + "exec-system": 'SYS1', + "exec-submitted": '2024-01-02T15:58:00.600Z' }; describe("Positive tests", () => { diff --git a/packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts b/packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts index 1c8b941cb1..3f66dc74d7 100644 --- a/packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts +++ b/packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts @@ -598,7 +598,10 @@ describe("GetJobs tests", () => { 'files-url': '', 'job-correlator': '', phase: 1, 'phase-name': 'name', 'reason-not-running': 'no', 'exec-started': '2024-01-02T15:57:58.350Z', - 'exec-ended': '2024-01-02T15:58:00.600Z' + 'exec-ended': '2024-01-02T15:58:00.600Z', + "exec-member": 'SYS1', + "exec-system": 'SYS1', + "exec-submitted": '2024-01-02T15:58:00.600Z' }, { jobid: '2', jobname: 'b', subsystem: 'sub', @@ -607,7 +610,10 @@ describe("GetJobs tests", () => { 'files-url': '', 'job-correlator': '', phase: 1, 'phase-name': 'name', 'reason-not-running': 'no', 'exec-started': '2024-01-02T15:57:58.350Z', - 'exec-ended': '2024-01-02T15:58:00.600Z' + 'exec-ended': '2024-01-02T15:58:00.600Z', + "exec-member": 'SYS1', + "exec-system": 'SYS1', + "exec-submitted": '2024-01-02T15:58:00.600Z' }, { jobid: '3', jobname: 'c', subsystem: 'sub', @@ -616,7 +622,10 @@ describe("GetJobs tests", () => { 'files-url': '', 'job-correlator': '', phase: 1, 'phase-name': 'name', 'reason-not-running': 'no', 'exec-started': '2024-01-02T15:57:58.350Z', - 'exec-ended': '2024-01-02T15:58:00.600Z' + 'exec-ended': '2024-01-02T15:58:00.600Z', + "exec-member": 'SYS1', + "exec-system": 'SYS1', + "exec-submitted": '2024-01-02T15:58:00.600Z' } ]; @@ -628,7 +637,10 @@ describe("GetJobs tests", () => { 'files-url': '', 'job-correlator': '', phase: 1, 'phase-name': 'name', 'reason-not-running': 'no', 'exec-started': '2024-01-02T15:57:58.350Z', - 'exec-ended': '2024-01-02T15:58:00.600Z' + 'exec-ended': '2024-01-02T15:58:00.600Z', + "exec-member": 'SYS1', + "exec-system": 'SYS1', + "exec-submitted": '2024-01-02T15:58:00.600Z' }, { jobid: '3', jobname: 'c', subsystem: 'sub', @@ -637,7 +649,10 @@ describe("GetJobs tests", () => { 'files-url': '', 'job-correlator': '', phase: 1, 'phase-name': 'name', 'reason-not-running': 'no', 'exec-started': '2024-01-02T15:57:58.350Z', - 'exec-ended': '2024-01-02T15:58:00.600Z' + 'exec-ended': '2024-01-02T15:58:00.600Z', + "exec-member": 'SYS1', + "exec-system": 'SYS1', + "exec-submitted": '2024-01-02T15:58:00.600Z' } ]; const filteredResults = GetJobs['filterResultsByStatuses'](jobs, { status: 'OUTPUT', owner: 'zowe' }); diff --git a/packages/zosjobs/__tests__/__unit__/SubmitJobs.unit.test.ts b/packages/zosjobs/__tests__/__unit__/SubmitJobs.unit.test.ts index 0b03de6bda..da4305381a 100644 --- a/packages/zosjobs/__tests__/__unit__/SubmitJobs.unit.test.ts +++ b/packages/zosjobs/__tests__/__unit__/SubmitJobs.unit.test.ts @@ -47,6 +47,9 @@ const sampleJob: IJob = { "subsystem": "JES2", "exec-started": '2024-01-02T15:57:58.350Z', "exec-ended": '2024-01-02T15:58:00.600Z', + "exec-member": 'SYS1', + "exec-system": 'SYS1', + "exec-submitted": '2024-01-02T15:58:00.600Z', "owner": "IBMUSER", "status": "OUTPUT", "type": "job", diff --git a/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap b/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap index 2d849555e1..ca74e41c93 100644 --- a/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap +++ b/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap @@ -15,7 +15,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -32,7 +35,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -54,7 +60,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -71,7 +80,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -93,7 +105,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -110,7 +125,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -132,7 +150,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -149,7 +170,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -171,7 +195,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -188,7 +215,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -210,7 +240,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -227,7 +260,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -249,7 +285,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -266,7 +305,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -288,7 +330,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -305,7 +350,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -327,7 +375,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -344,7 +395,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -366,7 +420,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -383,7 +440,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -405,7 +465,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -422,7 +485,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -461,7 +527,10 @@ exports[`GetJobs tests getJobs APIs should locate a job by jobid 1`] = ` Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -492,7 +561,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -509,7 +581,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -531,7 +606,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -548,7 +626,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -748,7 +829,10 @@ exports[`GetJobs tests getStatus APIs should get a job via getStatus and getStat Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -768,7 +852,10 @@ exports[`GetJobs tests getStatus APIs should get a job via getStatus and getStat Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", + "exec-member": "DE20", "exec-started": "2024-01-02T15:57:58.350Z", + "exec-submitted": "2024-01-02T15:58:00.600Z", + "exec-system": "DE20", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", diff --git a/packages/zosjobs/src/GetJobs.ts b/packages/zosjobs/src/GetJobs.ts index 5ff8cb142a..0b774bcbac 100644 --- a/packages/zosjobs/src/GetJobs.ts +++ b/packages/zosjobs/src/GetJobs.ts @@ -153,7 +153,7 @@ export class GetJobs { Logger.getAppLogger().trace("GetJobs.getJobsCommon()"); ImperativeExpect.toNotBeNullOrUndefined(session, "Required session must be defined"); let query = JobsConstants.QUERY_ID; - const includeExecData = params?.execData != false; + const includeExecData = params?.execData !== false; if (params) { if (params.owner) { diff --git a/packages/zosjobs/src/doc/response/IJob.ts b/packages/zosjobs/src/doc/response/IJob.ts index 5ddfdf0bcf..3963a6b783 100644 --- a/packages/zosjobs/src/doc/response/IJob.ts +++ b/packages/zosjobs/src/doc/response/IJob.ts @@ -48,6 +48,27 @@ export interface IJob { */ "exec-ended": string; + /** + * exec-member + * @type {string} + * @memberof IJob + */ + "exec-member": string; + + /** + * exec-submitted + * @type {Date} + * @memberof IJob + */ + "exec-submitted": string; + + /** + * exec-system + * @type {String} + * @memberof IJob + */ + "exec-system": string; + /** * The primary or secondary JES subsystem. * If this value is null, the job was processed by the primary subsystem. From 53f296a7959676372cc0762740d64316789319de Mon Sep 17 00:00:00 2001 From: Pujal Date: Fri, 25 Oct 2024 16:49:52 -0400 Subject: [PATCH 08/11] fixed getJobs() error Signed-off-by: Pujal --- .../imperative/plugins/suites/sample-plugin.json | 11 +++++++++++ .../test_plugins/override_plugin/package.json | 2 +- .../__snapshots__/GetJobs.unit.test.ts.snap | 2 +- packages/zosjobs/src/GetJobs.ts | 13 +++++++------ 4 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 packages/imperative/__tests__/src/packages/imperative/plugins/suites/sample-plugin.json diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/suites/sample-plugin.json b/packages/imperative/__tests__/src/packages/imperative/plugins/suites/sample-plugin.json new file mode 100644 index 0000000000..099053db9e --- /dev/null +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/suites/sample-plugin.json @@ -0,0 +1,11 @@ +{ + "normal-plugin": { + "package": "/Users/pujalgandhi/Documents/ZOWE/zowe-cli/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin", + "version": "1.0.1" + }, + "normal-plugin-2": { + "package": "/Users/pujalgandhi/Documents/ZOWE/zowe-cli/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2", + "location": "http://imperative-npm-registry:4873", + "version": "1.0.2" + } +} diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/package.json b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/package.json index 8a0fb0e246..8851951c26 100644 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/package.json +++ b/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/override_plugin/package.json @@ -1,5 +1,5 @@ { - "name": "@zowe/secrets-for-kubernetes-for-zowe-cli", + "name": "override-plugin", "version": "1.0.1", "description": "Some description", "main": "lib/index.js", diff --git a/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap b/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap index ca74e41c93..bcb25df65b 100644 --- a/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap +++ b/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap @@ -521,7 +521,7 @@ exports[`GetJobs tests getJobs APIs should have proper URI when using owner 1`] exports[`GetJobs tests getJobs APIs should have proper URI when using prefix 1`] = `"/zosmf/restjobs/jobs?prefix=fakePrefix&exec-data=Y"`; -exports[`GetJobs tests getJobs APIs should have proper URI when using status 1`] = `"/zosmf/restjobs/jobs?exec-data=Y&status=active"`; +exports[`GetJobs tests getJobs APIs should have proper URI when using status 1`] = `"/zosmf/restjobs/jobs?status=active&exec-data=Y"`; exports[`GetJobs tests getJobs APIs should locate a job by jobid 1`] = ` Object { diff --git a/packages/zosjobs/src/GetJobs.ts b/packages/zosjobs/src/GetJobs.ts index 0b774bcbac..6bc2d7163b 100644 --- a/packages/zosjobs/src/GetJobs.ts +++ b/packages/zosjobs/src/GetJobs.ts @@ -181,12 +181,6 @@ export class GetJobs { } query += JobsConstants.QUERY_JOBID + encodeURIComponent(params.jobid); } - if (includeExecData) { - if (RestClient.hasQueryString(query)) { - query += JobsConstants.COMBO_ID; - } - query += JobsConstants.EXEC_DATA; - } if (params.status) { if (RestClient.hasQueryString(query)) { query += JobsConstants.COMBO_ID; @@ -195,6 +189,13 @@ export class GetJobs { } } + if (includeExecData) { + if (RestClient.hasQueryString(query)) { + query += JobsConstants.COMBO_ID; + } + query += JobsConstants.EXEC_DATA; + } + let resource = JobsConstants.RESOURCE; resource += query === JobsConstants.QUERY_ID ? "" : query; Logger.getAppLogger().info("GetJobs.getJobsCommon() resource: " + resource); From a8f0cf418b58f5dbcc8dc05205344cf1c00f9b45 Mon Sep 17 00:00:00 2001 From: Pujal Gandhi <71276682+pujal0909@users.noreply.github.com> Date: Mon, 28 Oct 2024 11:09:35 -0400 Subject: [PATCH 09/11] Delete packages/imperative/__tests__/src/packages/imperative/plugins/suites/sample-plugin.json Signed-off-by: Pujal Gandhi <71276682+pujal0909@users.noreply.github.com> --- .../imperative/plugins/suites/sample-plugin.json | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 packages/imperative/__tests__/src/packages/imperative/plugins/suites/sample-plugin.json diff --git a/packages/imperative/__tests__/src/packages/imperative/plugins/suites/sample-plugin.json b/packages/imperative/__tests__/src/packages/imperative/plugins/suites/sample-plugin.json deleted file mode 100644 index 099053db9e..0000000000 --- a/packages/imperative/__tests__/src/packages/imperative/plugins/suites/sample-plugin.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "normal-plugin": { - "package": "/Users/pujalgandhi/Documents/ZOWE/zowe-cli/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin", - "version": "1.0.1" - }, - "normal-plugin-2": { - "package": "/Users/pujalgandhi/Documents/ZOWE/zowe-cli/packages/imperative/__tests__/src/packages/imperative/plugins/test_plugins/normal_plugin_2", - "location": "http://imperative-npm-registry:4873", - "version": "1.0.2" - } -} From f408fc3da5ae2ac8e77770ba257bab107275b664 Mon Sep 17 00:00:00 2001 From: Pujal Date: Mon, 28 Oct 2024 12:33:51 -0400 Subject: [PATCH 10/11] updated iJob interface Signed-off-by: Pujal --- .../__tests__/__resources__/api/GetJobsData.ts | 12 ++++++------ packages/zosjobs/src/GetJobs.ts | 13 ++++++------- packages/zosjobs/src/doc/response/IJob.ts | 10 +++++----- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts b/packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts index fb58d21b0d..144f9b8d85 100644 --- a/packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts +++ b/packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts @@ -32,8 +32,8 @@ export class GetJobsData { "exec-started": '2024-01-02T15:57:58.350Z', "exec-ended": '2024-01-02T15:58:00.600Z', "exec-submitted": '2024-01-02T15:58:00.600Z', - "exec-member": 'DE20', - "exec-system": 'DE20', + "exec-member": 'SYS1', + "exec-system": 'SYS1', "subsystem": "JES2", "owner": "IBMUSER", "status": "OUTPUT", @@ -59,8 +59,8 @@ export class GetJobsData { "exec-started": '2024-01-02T15:57:58.350Z', "exec-ended": '2024-01-02T15:58:00.600Z', "exec-submitted": '2024-01-02T15:58:00.600Z', - "exec-member": 'DE20', - "exec-system": 'DE20', + "exec-member": 'SYS1', + "exec-system": 'SYS1', "subsystem": "JES2", "owner": "CAUSER", "status": "OUTPUT", @@ -94,8 +94,8 @@ export class GetJobsData { "exec-started": '2024-01-02T15:57:58.350Z', "exec-ended": '2024-01-02T15:58:00.600Z', "exec-submitted": '2024-01-02T15:58:00.600Z', - "exec-member": 'DE20', - "exec-system": 'DE20', + "exec-member": 'SYS1', + "exec-system": 'SYS1', "status": "INPUT", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "class": "A", diff --git a/packages/zosjobs/src/GetJobs.ts b/packages/zosjobs/src/GetJobs.ts index 6bc2d7163b..4e7c510f12 100644 --- a/packages/zosjobs/src/GetJobs.ts +++ b/packages/zosjobs/src/GetJobs.ts @@ -153,7 +153,6 @@ export class GetJobs { Logger.getAppLogger().trace("GetJobs.getJobsCommon()"); ImperativeExpect.toNotBeNullOrUndefined(session, "Required session must be defined"); let query = JobsConstants.QUERY_ID; - const includeExecData = params?.execData !== false; if (params) { if (params.owner) { @@ -181,6 +180,12 @@ export class GetJobs { } query += JobsConstants.QUERY_JOBID + encodeURIComponent(params.jobid); } + if (params.execData) { + if (RestClient.hasQueryString(query)) { + query += JobsConstants.COMBO_ID; + } + query += JobsConstants.EXEC_DATA; + } if (params.status) { if (RestClient.hasQueryString(query)) { query += JobsConstants.COMBO_ID; @@ -189,12 +194,6 @@ export class GetJobs { } } - if (includeExecData) { - if (RestClient.hasQueryString(query)) { - query += JobsConstants.COMBO_ID; - } - query += JobsConstants.EXEC_DATA; - } let resource = JobsConstants.RESOURCE; resource += query === JobsConstants.QUERY_ID ? "" : query; diff --git a/packages/zosjobs/src/doc/response/IJob.ts b/packages/zosjobs/src/doc/response/IJob.ts index 3963a6b783..d181827b77 100644 --- a/packages/zosjobs/src/doc/response/IJob.ts +++ b/packages/zosjobs/src/doc/response/IJob.ts @@ -39,35 +39,35 @@ export interface IJob { * @type {Date} * @memberof IJob */ - "exec-started": string; + "exec-started"?: string; /** * end date of the job * @type {Date} * @memberof IJob */ - "exec-ended": string; + "exec-ended"?: string; /** * exec-member * @type {string} * @memberof IJob */ - "exec-member": string; + "exec-member"?: string; /** * exec-submitted * @type {Date} * @memberof IJob */ - "exec-submitted": string; + "exec-submitted"?: string; /** * exec-system * @type {String} * @memberof IJob */ - "exec-system": string; + "exec-system"?: string; /** * The primary or secondary JES subsystem. From 11cd8aed6936649cb1b1cd983c222da428325020 Mon Sep 17 00:00:00 2001 From: Pujal Date: Mon, 28 Oct 2024 13:26:44 -0400 Subject: [PATCH 11/11] updated snapshots Signed-off-by: Pujal --- .../__snapshots__/GetJobs.unit.test.ts.snap | 134 +++++++++--------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap b/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap index bcb25df65b..f9d948a744 100644 --- a/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap +++ b/packages/zosjobs/__tests__/__unit__/__snapshots__/GetJobs.unit.test.ts.snap @@ -15,10 +15,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -35,10 +35,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -60,10 +60,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -80,10 +80,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -105,10 +105,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -125,10 +125,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -150,10 +150,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -170,10 +170,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -195,10 +195,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -215,10 +215,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -240,10 +240,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -260,10 +260,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -285,10 +285,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -305,10 +305,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -330,10 +330,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -350,10 +350,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -375,10 +375,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -395,10 +395,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -420,10 +420,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -440,10 +440,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -465,10 +465,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -485,10 +485,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -505,32 +505,32 @@ Array [ ] `; -exports[`GetJobs tests getJobs APIs should have proper URI when using all parms 1`] = `"/zosmf/restjobs/jobs?owner=fakeOwner&prefix=fakePrefix&max-jobs=2&jobid=fakeID&exec-data=Y"`; +exports[`GetJobs tests getJobs APIs should have proper URI when using all parms 1`] = `"/zosmf/restjobs/jobs?owner=fakeOwner&prefix=fakePrefix&max-jobs=2&jobid=fakeID"`; -exports[`GetJobs tests getJobs APIs should have proper URI when using jobid 1`] = `"/zosmf/restjobs/jobs?jobid=fakeJobid&exec-data=Y"`; +exports[`GetJobs tests getJobs APIs should have proper URI when using jobid 1`] = `"/zosmf/restjobs/jobs?jobid=fakeJobid"`; -exports[`GetJobs tests getJobs APIs should have proper URI when using jobname and jobid 1`] = `"/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&exec-data=Y"`; +exports[`GetJobs tests getJobs APIs should have proper URI when using jobname and jobid 1`] = `"/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix"`; -exports[`GetJobs tests getJobs APIs should have proper URI when using jobname, prefix, and jobid 1`] = `"/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&jobid=fakeJobid&exec-data=Y"`; +exports[`GetJobs tests getJobs APIs should have proper URI when using jobname, prefix, and jobid 1`] = `"/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&jobid=fakeJobid"`; -exports[`GetJobs tests getJobs APIs should have proper URI when using maxjobs 1`] = `"/zosmf/restjobs/jobs?max-jobs=10&exec-data=Y"`; +exports[`GetJobs tests getJobs APIs should have proper URI when using maxjobs 1`] = `"/zosmf/restjobs/jobs?max-jobs=10"`; -exports[`GetJobs tests getJobs APIs should have proper URI when using no parms 1`] = `"/zosmf/restjobs/jobs?exec-data=Y"`; +exports[`GetJobs tests getJobs APIs should have proper URI when using no parms 1`] = `"/zosmf/restjobs/jobs"`; -exports[`GetJobs tests getJobs APIs should have proper URI when using owner 1`] = `"/zosmf/restjobs/jobs?owner=fakeOwner&exec-data=Y"`; +exports[`GetJobs tests getJobs APIs should have proper URI when using owner 1`] = `"/zosmf/restjobs/jobs?owner=fakeOwner"`; -exports[`GetJobs tests getJobs APIs should have proper URI when using prefix 1`] = `"/zosmf/restjobs/jobs?prefix=fakePrefix&exec-data=Y"`; +exports[`GetJobs tests getJobs APIs should have proper URI when using prefix 1`] = `"/zosmf/restjobs/jobs?prefix=fakePrefix"`; -exports[`GetJobs tests getJobs APIs should have proper URI when using status 1`] = `"/zosmf/restjobs/jobs?status=active&exec-data=Y"`; +exports[`GetJobs tests getJobs APIs should have proper URI when using status 1`] = `"/zosmf/restjobs/jobs?status=active"`; exports[`GetJobs tests getJobs APIs should locate a job by jobid 1`] = ` Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -561,10 +561,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -581,10 +581,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -606,10 +606,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -626,10 +626,10 @@ Array [ Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "https://tso1:443/zosmf/restjobs/jobs/J0003781USILDAMDD3CE8146.......%3A/files", "job-correlator": "J0003781USILDAMDD3CE8146.......:", "jobid": "JOB03781", @@ -829,10 +829,10 @@ exports[`GetJobs tests getStatus APIs should get a job via getStatus and getStat Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx", @@ -852,10 +852,10 @@ exports[`GetJobs tests getStatus APIs should get a job via getStatus and getStat Object { "class": "A", "exec-ended": "2024-01-02T15:58:00.600Z", - "exec-member": "DE20", + "exec-member": "SYS1", "exec-started": "2024-01-02T15:57:58.350Z", "exec-submitted": "2024-01-02T15:58:00.600Z", - "exec-system": "DE20", + "exec-system": "SYS1", "files-url": "www.nowhere.com/restjobs/jobs/files", "job-correlator": "123545asdfadf", "jobid": "TSUxxx",