Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancing GetJobs.getJob #2320

Merged
merged 15 commits into from
Oct 28, 2024
Merged
3 changes: 3 additions & 0 deletions packages/zosjobs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions packages/zosjobs/__tests__/__resources__/api/GetJobsData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
21 changes: 16 additions & 5 deletions packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
it("should have proper URI when using status", () => {
(ZosmfRestClient.getExpectJSON as any) =
jest.fn((session: AbstractSession, resource: string, headers?: any[]) => {
expect(resource).toMatchSnapshot();

Check failure on line 289 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, macos-14)

GetJobs tests › getJobs APIs › should have proper URI when using status

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using status 1` Snapshot: "/zosmf/restjobs/jobs?status=active" Received: "/zosmf/restjobs/jobs?exec-data=Y&status=active" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:289:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:291:21)

Check failure on line 289 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, macos-14)

GetJobs tests › getJobs APIs › should have proper URI when using status

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using status 1` Snapshot: "/zosmf/restjobs/jobs?status=active" Received: "/zosmf/restjobs/jobs?exec-data=Y&status=active" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:289:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:291:21)

Check failure on line 289 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, ubuntu-22.04)

GetJobs tests › getJobs APIs › should have proper URI when using status

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using status 1` Snapshot: "/zosmf/restjobs/jobs?status=active" Received: "/zosmf/restjobs/jobs?exec-data=Y&status=active" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:289:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:291:21)

Check failure on line 289 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, ubuntu-22.04)

GetJobs tests › getJobs APIs › should have proper URI when using status

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using status 1` Snapshot: "/zosmf/restjobs/jobs?status=active" Received: "/zosmf/restjobs/jobs?exec-data=Y&status=active" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:289:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:291:21)

Check failure on line 289 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, windows-latest)

GetJobs tests › getJobs APIs › should have proper URI when using status

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using status 1` Snapshot: "/zosmf/restjobs/jobs?status=active" Received: "/zosmf/restjobs/jobs?exec-data=Y&status=active" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:289:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:291:21)

Check failure on line 289 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, windows-latest)

GetJobs tests › getJobs APIs › should have proper URI when using status

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using status 1` Snapshot: "/zosmf/restjobs/jobs?status=active" Received: "/zosmf/restjobs/jobs?exec-data=Y&status=active" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:289:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:291:21)
});
GetJobs.getJobsCommon(pretendSession, {status: "active"});
});
Expand All @@ -294,7 +294,7 @@
it("should have proper URI when using no parms", () => {
(ZosmfRestClient.getExpectJSON as any) =
jest.fn((session: AbstractSession, resource: string, headers?: any[]) => {
expect(resource).toMatchSnapshot();

Check failure on line 297 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, macos-14)

GetJobs tests › getJobs APIs › should have proper URI when using no parms

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using no parms 1` Snapshot: "/zosmf/restjobs/jobs" Received: "/zosmf/restjobs/jobs?exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:297:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:299:21)

Check failure on line 297 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, macos-14)

GetJobs tests › getJobs APIs › should have proper URI when using no parms

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using no parms 1` Snapshot: "/zosmf/restjobs/jobs" Received: "/zosmf/restjobs/jobs?exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:297:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:299:21)

Check failure on line 297 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, ubuntu-22.04)

GetJobs tests › getJobs APIs › should have proper URI when using no parms

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using no parms 1` Snapshot: "/zosmf/restjobs/jobs" Received: "/zosmf/restjobs/jobs?exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:297:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:299:21)

Check failure on line 297 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, ubuntu-22.04)

GetJobs tests › getJobs APIs › should have proper URI when using no parms

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using no parms 1` Snapshot: "/zosmf/restjobs/jobs" Received: "/zosmf/restjobs/jobs?exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:297:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:299:21)

Check failure on line 297 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, windows-latest)

GetJobs tests › getJobs APIs › should have proper URI when using no parms

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using no parms 1` Snapshot: "/zosmf/restjobs/jobs" Received: "/zosmf/restjobs/jobs?exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:297:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:299:21)

Check failure on line 297 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, windows-latest)

GetJobs tests › getJobs APIs › should have proper URI when using no parms

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using no parms 1` Snapshot: "/zosmf/restjobs/jobs" Received: "/zosmf/restjobs/jobs?exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:297:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:299:21)
});
GetJobs.getJobsCommon(pretendSession, {});
});
Expand All @@ -302,7 +302,7 @@
it("should have proper URI when using prefix", () => {
(ZosmfRestClient.getExpectJSON as any) =
jest.fn((session: AbstractSession, resource: string, headers?: any[]) => {
expect(resource).toMatchSnapshot();

Check failure on line 305 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, macos-14)

GetJobs tests › getJobs APIs › should have proper URI when using prefix

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using prefix 1` Snapshot: "/zosmf/restjobs/jobs?prefix=fakePrefix" Received: "/zosmf/restjobs/jobs?prefix=fakePrefix&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:305:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:307:21)

Check failure on line 305 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, macos-14)

GetJobs tests › getJobs APIs › should have proper URI when using prefix

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using prefix 1` Snapshot: "/zosmf/restjobs/jobs?prefix=fakePrefix" Received: "/zosmf/restjobs/jobs?prefix=fakePrefix&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:305:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:307:21)

Check failure on line 305 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, ubuntu-22.04)

GetJobs tests › getJobs APIs › should have proper URI when using prefix

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using prefix 1` Snapshot: "/zosmf/restjobs/jobs?prefix=fakePrefix" Received: "/zosmf/restjobs/jobs?prefix=fakePrefix&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:305:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:307:21)

Check failure on line 305 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, ubuntu-22.04)

GetJobs tests › getJobs APIs › should have proper URI when using prefix

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using prefix 1` Snapshot: "/zosmf/restjobs/jobs?prefix=fakePrefix" Received: "/zosmf/restjobs/jobs?prefix=fakePrefix&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:305:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:307:21)

Check failure on line 305 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, windows-latest)

GetJobs tests › getJobs APIs › should have proper URI when using prefix

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using prefix 1` Snapshot: "/zosmf/restjobs/jobs?prefix=fakePrefix" Received: "/zosmf/restjobs/jobs?prefix=fakePrefix&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:305:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:307:21)

Check failure on line 305 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, windows-latest)

GetJobs tests › getJobs APIs › should have proper URI when using prefix

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using prefix 1` Snapshot: "/zosmf/restjobs/jobs?prefix=fakePrefix" Received: "/zosmf/restjobs/jobs?prefix=fakePrefix&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:305:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:307:21)
});
GetJobs.getJobsCommon(pretendSession, {prefix: "fakePrefix"});
});
Expand All @@ -310,7 +310,7 @@
it("should have proper URI when using owner", () => {
(ZosmfRestClient.getExpectJSON as any) =
jest.fn((session: AbstractSession, resource: string, headers?: any[]) => {
expect(resource).toMatchSnapshot();

Check failure on line 313 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, macos-14)

GetJobs tests › getJobs APIs › should have proper URI when using owner

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using owner 1` Snapshot: "/zosmf/restjobs/jobs?owner=fakeOwner" Received: "/zosmf/restjobs/jobs?owner=fakeOwner&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:313:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:315:21)

Check failure on line 313 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, macos-14)

GetJobs tests › getJobs APIs › should have proper URI when using owner

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using owner 1` Snapshot: "/zosmf/restjobs/jobs?owner=fakeOwner" Received: "/zosmf/restjobs/jobs?owner=fakeOwner&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:313:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:315:21)

Check failure on line 313 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, ubuntu-22.04)

GetJobs tests › getJobs APIs › should have proper URI when using owner

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using owner 1` Snapshot: "/zosmf/restjobs/jobs?owner=fakeOwner" Received: "/zosmf/restjobs/jobs?owner=fakeOwner&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:313:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:315:21)

Check failure on line 313 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, ubuntu-22.04)

GetJobs tests › getJobs APIs › should have proper URI when using owner

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using owner 1` Snapshot: "/zosmf/restjobs/jobs?owner=fakeOwner" Received: "/zosmf/restjobs/jobs?owner=fakeOwner&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:313:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:315:21)

Check failure on line 313 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, windows-latest)

GetJobs tests › getJobs APIs › should have proper URI when using owner

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using owner 1` Snapshot: "/zosmf/restjobs/jobs?owner=fakeOwner" Received: "/zosmf/restjobs/jobs?owner=fakeOwner&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:313:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:315:21)

Check failure on line 313 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, windows-latest)

GetJobs tests › getJobs APIs › should have proper URI when using owner

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using owner 1` Snapshot: "/zosmf/restjobs/jobs?owner=fakeOwner" Received: "/zosmf/restjobs/jobs?owner=fakeOwner&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:313:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:315:21)
});
GetJobs.getJobsCommon(pretendSession, {owner: "fakeOwner"});
});
Expand All @@ -318,7 +318,7 @@
it("should have proper URI when using maxjobs", () => {
(ZosmfRestClient.getExpectJSON as any) =
jest.fn((session: AbstractSession, resource: string, headers?: any[]) => {
expect(resource).toMatchSnapshot();

Check failure on line 321 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, macos-14)

GetJobs tests › getJobs APIs › should have proper URI when using maxjobs

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using maxjobs 1` Snapshot: "/zosmf/restjobs/jobs?max-jobs=10" Received: "/zosmf/restjobs/jobs?max-jobs=10&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:321:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:323:21)

Check failure on line 321 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, macos-14)

GetJobs tests › getJobs APIs › should have proper URI when using maxjobs

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using maxjobs 1` Snapshot: "/zosmf/restjobs/jobs?max-jobs=10" Received: "/zosmf/restjobs/jobs?max-jobs=10&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:321:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:323:21)

Check failure on line 321 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, ubuntu-22.04)

GetJobs tests › getJobs APIs › should have proper URI when using maxjobs

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using maxjobs 1` Snapshot: "/zosmf/restjobs/jobs?max-jobs=10" Received: "/zosmf/restjobs/jobs?max-jobs=10&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:321:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:323:21)

Check failure on line 321 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, ubuntu-22.04)

GetJobs tests › getJobs APIs › should have proper URI when using maxjobs

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using maxjobs 1` Snapshot: "/zosmf/restjobs/jobs?max-jobs=10" Received: "/zosmf/restjobs/jobs?max-jobs=10&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:321:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:323:21)

Check failure on line 321 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, windows-latest)

GetJobs tests › getJobs APIs › should have proper URI when using maxjobs

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using maxjobs 1` Snapshot: "/zosmf/restjobs/jobs?max-jobs=10" Received: "/zosmf/restjobs/jobs?max-jobs=10&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:321:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:323:21)

Check failure on line 321 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, windows-latest)

GetJobs tests › getJobs APIs › should have proper URI when using maxjobs

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using maxjobs 1` Snapshot: "/zosmf/restjobs/jobs?max-jobs=10" Received: "/zosmf/restjobs/jobs?max-jobs=10&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:321:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:323:21)
});
GetJobs.getJobsCommon(pretendSession, {maxJobs: 10});
});
Expand All @@ -326,7 +326,7 @@
it("should have proper URI when using jobid", () => {
(ZosmfRestClient.getExpectJSON as any) =
jest.fn((session: AbstractSession, resource: string, headers?: any[]) => {
expect(resource).toMatchSnapshot();

Check failure on line 329 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, macos-14)

GetJobs tests › getJobs APIs › should have proper URI when using jobid

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using jobid 1` Snapshot: "/zosmf/restjobs/jobs?jobid=fakeJobid" Received: "/zosmf/restjobs/jobs?jobid=fakeJobid&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:329:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:331:21)

Check failure on line 329 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, macos-14)

GetJobs tests › getJobs APIs › should have proper URI when using jobid

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using jobid 1` Snapshot: "/zosmf/restjobs/jobs?jobid=fakeJobid" Received: "/zosmf/restjobs/jobs?jobid=fakeJobid&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:329:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:331:21)

Check failure on line 329 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, ubuntu-22.04)

GetJobs tests › getJobs APIs › should have proper URI when using jobid

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using jobid 1` Snapshot: "/zosmf/restjobs/jobs?jobid=fakeJobid" Received: "/zosmf/restjobs/jobs?jobid=fakeJobid&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:329:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:331:21)

Check failure on line 329 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, ubuntu-22.04)

GetJobs tests › getJobs APIs › should have proper URI when using jobid

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using jobid 1` Snapshot: "/zosmf/restjobs/jobs?jobid=fakeJobid" Received: "/zosmf/restjobs/jobs?jobid=fakeJobid&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:329:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:331:21)

Check failure on line 329 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, windows-latest)

GetJobs tests › getJobs APIs › should have proper URI when using jobid

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using jobid 1` Snapshot: "/zosmf/restjobs/jobs?jobid=fakeJobid" Received: "/zosmf/restjobs/jobs?jobid=fakeJobid&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:329:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:331:21)

Check failure on line 329 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, windows-latest)

GetJobs tests › getJobs APIs › should have proper URI when using jobid

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using jobid 1` Snapshot: "/zosmf/restjobs/jobs?jobid=fakeJobid" Received: "/zosmf/restjobs/jobs?jobid=fakeJobid&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:329:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:331:21)
});
GetJobs.getJobsCommon(pretendSession, {jobid: "fakeJobid"});
});
Expand All @@ -334,7 +334,7 @@
it("should have proper URI when using jobname and jobid", () => {
(ZosmfRestClient.getExpectJSON as any) =
jest.fn((session: AbstractSession, resource: string, headers?: any[]) => {
expect(resource).toMatchSnapshot();

Check failure on line 337 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, macos-14)

GetJobs tests › getJobs APIs › should have proper URI when using jobname and jobid

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using jobname and jobid 1` Snapshot: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix" Received: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:337:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:82:24) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsByOwnerAndPrefix (packages/zosjobs/src/GetJobs.ts:3926:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:339:21)

Check failure on line 337 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, macos-14)

GetJobs tests › getJobs APIs › should have proper URI when using jobname and jobid

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using jobname and jobid 1` Snapshot: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix" Received: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:337:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:82:24) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsByOwnerAndPrefix (packages/zosjobs/src/GetJobs.ts:3926:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:339:21)

Check failure on line 337 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, ubuntu-22.04)

GetJobs tests › getJobs APIs › should have proper URI when using jobname and jobid

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using jobname and jobid 1` Snapshot: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix" Received: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:337:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:82:24) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsByOwnerAndPrefix (packages/zosjobs/src/GetJobs.ts:3926:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:339:21)

Check failure on line 337 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, ubuntu-22.04)

GetJobs tests › getJobs APIs › should have proper URI when using jobname and jobid

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using jobname and jobid 1` Snapshot: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix" Received: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:337:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:82:24) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsByOwnerAndPrefix (packages/zosjobs/src/GetJobs.ts:3926:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:339:21)

Check failure on line 337 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, windows-latest)

GetJobs tests › getJobs APIs › should have proper URI when using jobname and jobid

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using jobname and jobid 1` Snapshot: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix" Received: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:337:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:82:24) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsByOwnerAndPrefix (packages/zosjobs/src/GetJobs.ts:3926:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:339:21)

Check failure on line 337 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, windows-latest)

GetJobs tests › getJobs APIs › should have proper URI when using jobname and jobid

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using jobname and jobid 1` Snapshot: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix" Received: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:337:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:82:24) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsByOwnerAndPrefix (packages/zosjobs/src/GetJobs.ts:3926:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:339:21)
});
GetJobs.getJobsByOwnerAndPrefix(pretendSession, "someOwner", "somePrefix");
});
Expand All @@ -342,7 +342,7 @@
it("should have proper URI when using jobname, prefix, and jobid", () => {
(ZosmfRestClient.getExpectJSON as any) =
jest.fn((session: AbstractSession, resource: string, headers?: any[]) => {
expect(resource).toMatchSnapshot();

Check failure on line 345 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, macos-14)

GetJobs tests › getJobs APIs › should have proper URI when using jobname

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using jobname, prefix, and jobid 1` Snapshot: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&jobid=fakeJobid" Received: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&jobid=fakeJobid&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:345:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:347:21)

Check failure on line 345 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, macos-14)

GetJobs tests › getJobs APIs › should have proper URI when using jobname

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using jobname, prefix, and jobid 1` Snapshot: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&jobid=fakeJobid" Received: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&jobid=fakeJobid&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:345:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:347:21)

Check failure on line 345 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, ubuntu-22.04)

GetJobs tests › getJobs APIs › should have proper URI when using jobname

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using jobname, prefix, and jobid 1` Snapshot: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&jobid=fakeJobid" Received: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&jobid=fakeJobid&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:345:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:347:21)

Check failure on line 345 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, ubuntu-22.04)

GetJobs tests › getJobs APIs › should have proper URI when using jobname

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using jobname, prefix, and jobid 1` Snapshot: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&jobid=fakeJobid" Received: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&jobid=fakeJobid&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:345:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:347:21)

Check failure on line 345 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, windows-latest)

GetJobs tests › getJobs APIs › should have proper URI when using jobname

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using jobname, prefix, and jobid 1` Snapshot: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&jobid=fakeJobid" Received: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&jobid=fakeJobid&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:345:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:347:21)

Check failure on line 345 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, windows-latest)

GetJobs tests › getJobs APIs › should have proper URI when using jobname

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using jobname, prefix, and jobid 1` Snapshot: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&jobid=fakeJobid" Received: "/zosmf/restjobs/jobs?owner=someOwner&prefix=somePrefix&jobid=fakeJobid&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:345:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:347:21)
});
GetJobs.getJobsCommon(pretendSession, {jobid: "fakeJobid", prefix: "somePrefix", owner: "someOwner"});
});
Expand All @@ -350,7 +350,7 @@
it("should have proper URI when using all parms", () => {
(ZosmfRestClient.getExpectJSON as any) =
jest.fn((session: AbstractSession, resource: string, headers?: any[]) => {
expect(resource).toMatchSnapshot();

Check failure on line 353 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, macos-14)

GetJobs tests › getJobs APIs › should have proper URI when using all parms

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using all parms 1` Snapshot: "/zosmf/restjobs/jobs?owner=fakeOwner&prefix=fakePrefix&max-jobs=2&jobid=fakeID" Received: "/zosmf/restjobs/jobs?owner=fakeOwner&prefix=fakePrefix&max-jobs=2&jobid=fakeID&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:353:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:355:21)

Check failure on line 353 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, macos-14)

GetJobs tests › getJobs APIs › should have proper URI when using all parms

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using all parms 1` Snapshot: "/zosmf/restjobs/jobs?owner=fakeOwner&prefix=fakePrefix&max-jobs=2&jobid=fakeID" Received: "/zosmf/restjobs/jobs?owner=fakeOwner&prefix=fakePrefix&max-jobs=2&jobid=fakeID&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:353:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:355:21)

Check failure on line 353 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, ubuntu-22.04)

GetJobs tests › getJobs APIs › should have proper URI when using all parms

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using all parms 1` Snapshot: "/zosmf/restjobs/jobs?owner=fakeOwner&prefix=fakePrefix&max-jobs=2&jobid=fakeID" Received: "/zosmf/restjobs/jobs?owner=fakeOwner&prefix=fakePrefix&max-jobs=2&jobid=fakeID&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:353:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:355:21)

Check failure on line 353 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, ubuntu-22.04)

GetJobs tests › getJobs APIs › should have proper URI when using all parms

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using all parms 1` Snapshot: "/zosmf/restjobs/jobs?owner=fakeOwner&prefix=fakePrefix&max-jobs=2&jobid=fakeID" Received: "/zosmf/restjobs/jobs?owner=fakeOwner&prefix=fakePrefix&max-jobs=2&jobid=fakeID&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:353:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:355:21)

Check failure on line 353 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (20.x, windows-latest)

GetJobs tests › getJobs APIs › should have proper URI when using all parms

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using all parms 1` Snapshot: "/zosmf/restjobs/jobs?owner=fakeOwner&prefix=fakePrefix&max-jobs=2&jobid=fakeID" Received: "/zosmf/restjobs/jobs?owner=fakeOwner&prefix=fakePrefix&max-jobs=2&jobid=fakeID&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:353:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:355:21)

Check failure on line 353 in packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts

View workflow job for this annotation

GitHub Actions / test (18.x, windows-latest)

GetJobs tests › getJobs APIs › should have proper URI when using all parms

expect(received).toMatchSnapshot() Snapshot name: `GetJobs tests getJobs APIs should have proper URI when using all parms 1` Snapshot: "/zosmf/restjobs/jobs?owner=fakeOwner&prefix=fakePrefix&max-jobs=2&jobid=fakeID" Received: "/zosmf/restjobs/jobs?owner=fakeOwner&prefix=fakePrefix&max-jobs=2&jobid=fakeID&exec-data=Y" at Function.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:353:38) at Function.getExpectJSON (packages/zosjobs/src/GetJobs.ts:202:44) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:355:21)
});
GetJobs.getJobsCommon(pretendSession, {owner: "fakeOwner", prefix: "fakePrefix", maxJobs: 2, jobid: "fakeID"});
});
Expand Down Expand Up @@ -596,21 +596,28 @@
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 = [
Expand All @@ -619,14 +626,18 @@
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' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down
1 change: 1 addition & 0 deletions packages/zosjobs/src/GetJobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
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

Check failure on line 156 in packages/zosjobs/src/GetJobs.ts

View workflow job for this annotation

GitHub Actions / test (18.x, macos-14)

GetJobs tests › getJobs APIs › should get a list of jobs from getJobs and getJobsCommon

TypeError: Cannot set properties of undefined (setting 'execData') at Function.<anonymous> (packages/zosjobs/src/GetJobs.ts:156:24) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Function.getJobsCommon [as getJobs] (packages/zosjobs/src/GetJobs.ts:33:24) at packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:166:40 at packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:18:71 at Object.<anonymous>.__awaiter (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:14:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:163:83)

Check failure on line 156 in packages/zosjobs/src/GetJobs.ts

View workflow job for this annotation

GitHub Actions / test (20.x, macos-14)

GetJobs tests › getJobs APIs › should get a list of jobs from getJobs and getJobsCommon

TypeError: Cannot set properties of undefined (setting 'execData') at Function.<anonymous> (packages/zosjobs/src/GetJobs.ts:156:24) at packages/zosjobs/src/GetJobs.ts:3812:39 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Function.getJobsCommon [as getJobs] (packages/zosjobs/src/GetJobs.ts:33:24) at packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:166:40 at packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:18:71 at Object.<anonymous>.__awaiter (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:14:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:163:83)

Check failure on line 156 in packages/zosjobs/src/GetJobs.ts

View workflow job for this annotation

GitHub Actions / test (18.x, ubuntu-22.04)

GetJobs tests › getJobs APIs › should get a list of jobs from getJobs and getJobsCommon

TypeError: Cannot set properties of undefined (setting 'execData') at Function.<anonymous> (packages/zosjobs/src/GetJobs.ts:156:24) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Function.getJobsCommon [as getJobs] (packages/zosjobs/src/GetJobs.ts:33:24) at packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:166:40 at packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:18:71 at Object.<anonymous>.__awaiter (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:14:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:163:83)

Check failure on line 156 in packages/zosjobs/src/GetJobs.ts

View workflow job for this annotation

GitHub Actions / test (20.x, ubuntu-22.04)

GetJobs tests › getJobs APIs › should get a list of jobs from getJobs and getJobsCommon

TypeError: Cannot set properties of undefined (setting 'execData') at Function.<anonymous> (packages/zosjobs/src/GetJobs.ts:156:24) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Function.getJobsCommon [as getJobs] (packages/zosjobs/src/GetJobs.ts:33:24) at packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:166:40 at packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:18:71 at Object.<anonymous>.__awaiter (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:14:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:163:83)

Check failure on line 156 in packages/zosjobs/src/GetJobs.ts

View workflow job for this annotation

GitHub Actions / test (20.x, windows-latest)

GetJobs tests › getJobs APIs › should get a list of jobs from getJobs and getJobsCommon

TypeError: Cannot set properties of undefined (setting 'execData') at Function.<anonymous> (packages/zosjobs/src/GetJobs.ts:156:24) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Function.getJobsCommon [as getJobs] (packages/zosjobs/src/GetJobs.ts:33:24) at packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:166:40 at packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:18:71 at Object.<anonymous>.__awaiter (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:14:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:163:83)

Check failure on line 156 in packages/zosjobs/src/GetJobs.ts

View workflow job for this annotation

GitHub Actions / test (18.x, windows-latest)

GetJobs tests › getJobs APIs › should get a list of jobs from getJobs and getJobsCommon

TypeError: Cannot set properties of undefined (setting 'execData') at Function.<anonymous> (packages/zosjobs/src/GetJobs.ts:156:24) at packages/zosjobs/src/GetJobs.ts:3812:40 at Object.<anonymous>.__awaiter (packages/zosjobs/src/GetJobs.ts:3761:10) at Function.getJobsCommon (packages/zosjobs/src/GetJobs.ts:4052:12) at Function.getJobsCommon [as getJobs] (packages/zosjobs/src/GetJobs.ts:33:24) at packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:166:40 at packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:18:71 at Object.<anonymous>.__awaiter (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:14:12) at Object.<anonymous> (packages/zosjobs/__tests__/__unit__/GetJobs.unit.test.ts:163:83)
pujal0909 marked this conversation as resolved.
Show resolved Hide resolved

if (params) {
if (params.owner) {
Expand Down
14 changes: 14 additions & 0 deletions packages/zosjobs/src/doc/response/IJob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading