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
15 changes: 15 additions & 0 deletions packages/cli/__tests__/zosjobs/__resources__/GetJobsData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ 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',
"exec-member": 'SYS1',
"exec-system": 'SYS1',
"exec-submitted": '2024-01-02T15:58:00.600Z',
"subsystem": "JES2",
"owner": "IBMUSER",
"status": "OUTPUT",
Expand All @@ -49,6 +54,11 @@ 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',
"exec-member": 'SYS1',
"exec-system": 'SYS1',
"exec-submitted": '2024-01-02T15:58:00.600Z',
"subsystem": "JES2",
"owner": "CAUSER",
"status": "OUTPUT",
Expand Down Expand Up @@ -79,6 +89,11 @@ 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',
"exec-member": 'SYS1',
"exec-system": 'SYS1',
"exec-submitted": '2024-01-02T15:58:00.600Z',
"status": "INPUT",
"job-correlator": "J0003781USILDAMDD3CE8146.......:",
"class": "A",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ 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-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",
Expand All @@ -29,6 +34,11 @@ 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-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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ 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-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",
Expand All @@ -29,6 +34,11 @@ 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-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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ Object {
"output": 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",
Expand All @@ -28,6 +33,11 @@ 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",
Expand All @@ -51,6 +61,11 @@ 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-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",
Expand All @@ -66,6 +81,11 @@ 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",
Expand Down Expand Up @@ -95,6 +115,11 @@ Object {
"output": 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",
Expand All @@ -110,6 +135,11 @@ 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",
Expand All @@ -133,6 +163,11 @@ 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-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",
Expand All @@ -148,6 +183,11 @@ 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",
Expand Down Expand Up @@ -177,6 +217,11 @@ Object {
"output": 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",
Expand All @@ -192,6 +237,11 @@ 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",
Expand All @@ -215,6 +265,11 @@ 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-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",
Expand All @@ -230,6 +285,11 @@ 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",
Expand Down Expand Up @@ -259,6 +319,11 @@ Object {
"output": 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",
Expand All @@ -274,6 +339,11 @@ 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",
Expand All @@ -297,6 +367,11 @@ 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-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",
Expand All @@ -312,6 +387,11 @@ 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",
Expand Down
Loading