Skip to content

Commit d05c5cc

Browse files
authored
Merge pull request #211 from pcoop/branch1
Changes to output text
2 parents e885035 + b7e6a0c commit d05c5cc

File tree

2 files changed

+52
-52
lines changed

2 files changed

+52
-52
lines changed

__tests__/api/BundlePush/BundlePusher.test.ts

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -214,22 +214,22 @@ describe("BundlePusher01", () => {
214214
sshProfile = { host: "wobble", user: "user" };
215215

216216
await runPushTest("__tests__/__resources__/ExampleBundle01", true,
217-
"PUSH operation completed.");
217+
"PUSH operation completed");
218218
expect(consoleText).toContain("WARNING: ssh profile --host value 'wobble' does not match zosmf value 'wibble'.");
219219
});
220220
it("should not complain with matching zOSMF and SSH profile host names", async () => {
221221
zosmfProfile = { host: "wibble", user: "user" };
222222
sshProfile = { host: "wibble", user: "user" };
223223

224224
await runPushTest("__tests__/__resources__/ExampleBundle01", true,
225-
"PUSH operation completed.");
225+
"PUSH operation completed");
226226
expect(consoleText).not.toContain("WARNING: ssh profile");
227227
});
228228
it("should complain with mismatching zOSMF and CICS profile host names", async () => {
229229
cicsProfile = { host: "wibble", user: "testuser", password: "thisIsntReal", cicsPlex: "12345678", regionName: "12345678" };
230230

231231
await runPushTest("__tests__/__resources__/ExampleBundle01", true,
232-
"PUSH operation completed.");
232+
"PUSH operation completed");
233233
expect(consoleText).toContain("WARNING: cics profile --host value 'wibble' does not match zosmf value 'testhost'.");
234234
});
235235
it("should not complain with matching zOSMF and CICS profile host names", async () => {
@@ -238,31 +238,31 @@ describe("BundlePusher01", () => {
238238
cicsProfile = { host: "wibble", user: "user", password: "thisIsntReal", cicsPlex: "12345678", regionName: "12345678" };
239239

240240
await runPushTest("__tests__/__resources__/ExampleBundle01", true,
241-
"PUSH operation completed.");
241+
"PUSH operation completed");
242242
expect(consoleText).not.toContain("WARNING: cics profile");
243243
});
244244
it("should complain with mismatching zOSMF and SSH profile user names", async () => {
245245
zosmfProfile = { host: "wibble", user: "fred" };
246246
sshProfile = { host: "wibble", user: "joe" };
247247

248248
await runPushTest("__tests__/__resources__/ExampleBundle01", true,
249-
"PUSH operation completed.");
249+
"PUSH operation completed");
250250
expect(consoleText).toContain("WARNING: ssh profile --user value 'joe' does not match zosmf value 'fred'.");
251251
});
252252
it("should not complain with matching zOSMF and SSH profile user names", async () => {
253253
zosmfProfile = { host: "wibble", user: "fred" };
254254
sshProfile = { host: "wibble", user: "fred" };
255255

256256
await runPushTest("__tests__/__resources__/ExampleBundle01", true,
257-
"PUSH operation completed.");
257+
"PUSH operation completed");
258258
expect(consoleText).not.toContain("WARNING: ssh profile");
259259
});
260260
it("should not complain with matching zOSMF and SSH profile user names - case", async () => {
261261
zosmfProfile = { host: "wibble", user: "fred" };
262262
sshProfile = { host: "wibble", user: "FRED" };
263263

264264
await runPushTest("__tests__/__resources__/ExampleBundle01", true,
265-
"PUSH operation completed.");
265+
"PUSH operation completed");
266266
expect(consoleText).not.toContain("WARNING: ssh profile");
267267
});
268268
it("should complain with mismatching zOSMF and CICS profile user names", async () => {
@@ -271,7 +271,7 @@ describe("BundlePusher01", () => {
271271
cicsProfile = { host: "wibble", user: "joe", password: "thisIsntReal", cicsPlex: "12345678" };
272272

273273
await runPushTest("__tests__/__resources__/ExampleBundle01", true,
274-
"PUSH operation completed.");
274+
"PUSH operation completed");
275275
expect(consoleText).toContain("WARNING: cics profile --user value 'joe' does not match zosmf value 'fred'.");
276276
});
277277
it("should complain with mismatching cics-deploy and CICS plex names", async () => {
@@ -280,7 +280,7 @@ describe("BundlePusher01", () => {
280280
cicsProfile = { host: "wibble", user: "fred", password: "thisIsntReal", cicsPlex: "wibble", regionName: "12345678" };
281281

282282
await runPushTest("__tests__/__resources__/ExampleBundle01", true,
283-
"PUSH operation completed.");
283+
"PUSH operation completed");
284284
expect(consoleText).toContain("WARNING: cics profile --cics-plex value 'wibble' does not match --cicsplex value '12345678'.");
285285
});
286286
it("should complain if remote bundle dir mkdir fails", async () => {
@@ -351,7 +351,7 @@ describe("BundlePusher01", () => {
351351
throw new ImperativeError(impError);
352352
});
353353
await runPushTest("__tests__/__resources__/ExampleBundle01", false,
354-
"PUSH operation completed.");
354+
"PUSH operation completed");
355355

356356
expect(zosMFSpy).toHaveBeenCalledTimes(1);
357357
expect(sshSpy).toHaveBeenCalledTimes(1);
@@ -439,7 +439,7 @@ describe("BundlePusher01", () => {
439439
});
440440

441441
await runPushTest("__tests__/__resources__/ExampleBundle01", true,
442-
"PUSH operation completed.");
442+
"PUSH operation completed");
443443

444444
expect(zosMFSpy).toHaveBeenCalledTimes(1);
445445
expect(sshSpy).toHaveBeenCalledTimes(1);
@@ -457,7 +457,7 @@ describe("BundlePusher01", () => {
457457
shellSpy.mockImplementationOnce(() => { throw new Error( "Injected Shell error from npm uninstall" ); });
458458

459459
await runPushTest("__tests__/__resources__/ExampleBundle01", true,
460-
"PUSH operation completed.");
460+
"PUSH operation completed");
461461

462462
expect(zosMFSpy).toHaveBeenCalledTimes(1);
463463
expect(sshSpy).toHaveBeenCalledTimes(1);
@@ -489,7 +489,7 @@ describe("BundlePusher01", () => {
489489
});
490490

491491
await runPushTest("__tests__/__resources__/ExampleBundle01", true,
492-
"PUSH operation completed.");
492+
"PUSH operation completed");
493493

494494
expect(zosMFSpy).toHaveBeenCalledTimes(1);
495495
expect(sshSpy).toHaveBeenCalledTimes(1);
@@ -600,7 +600,7 @@ describe("BundlePusher01", () => {
600600
});
601601

602602
await runPushTest("__tests__/__resources__/ExampleBundle01", true,
603-
"PUSH operation completed.");
603+
"PUSH operation completed");
604604

605605
expect(consoleText).not.toContain("WARNING: No .zosAttributes file found in the bundle directory, default values will be applied.");
606606
expect(zosMFSpy).toHaveBeenCalledTimes(1);
@@ -615,7 +615,7 @@ describe("BundlePusher01", () => {
615615
});
616616
it("should use a default zosattribs file", async () => {
617617
await runPushTest("__tests__/__resources__/ExampleBundle01", true,
618-
"PUSH operation completed.");
618+
"PUSH operation completed");
619619

620620
expect(consoleText).toContain("WARNING: No .zosAttributes file found in the bundle directory, default values will be applied.");
621621
expect(zosMFSpy).toHaveBeenCalledTimes(1);
@@ -841,7 +841,7 @@ describe("BundlePusher01", () => {
841841
});
842842
it("should run to completion", async () => {
843843

844-
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed.");
844+
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed");
845845

846846
expect(zosMFSpy).toHaveBeenCalledTimes(1);
847847
expect(sshSpy).toHaveBeenCalledTimes(1);
@@ -866,7 +866,7 @@ describe("BundlePusher01", () => {
866866
return [ "package.json" ];
867867
});
868868

869-
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed.", parms);
869+
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed", parms);
870870

871871
expect(consoleText).toContain("Making remote bundle directory '/u/escapedDirName/12345678'");
872872
expect(zosMFSpy).toHaveBeenCalledTimes(1);
@@ -913,7 +913,7 @@ describe("BundlePusher01", () => {
913913
return IS_NOT_DIRECTORY;
914914
});
915915

916-
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed.", parms);
916+
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed", parms);
917917

918918
expect(consoleText).toContain("Running 'npm install' in '/u/escapedDirName/12345678/XXXDIRXXX'");
919919
expect(consoleText).toContain("Running 'npm install' in '/u/escapedDirName/12345678/XXXDIRXXX/ZZZDIRZZZ'");
@@ -942,7 +942,7 @@ describe("BundlePusher01", () => {
942942
return [ "package.json" ];
943943
});
944944

945-
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed.", parms);
945+
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed", parms);
946946

947947
expect(consoleText).toContain("Making remote bundle directory '/u/ThisDoesNotExist/12345678'");
948948
expect(consoleText).toContain("Accessing contents of remote bundle directory");
@@ -977,7 +977,7 @@ describe("BundlePusher01", () => {
977977
return [ "package.json" ];
978978
});
979979

980-
await runPushTest("__tests__/__resources__/ExampleBundle01", true, "PUSH operation completed.", parms);
980+
await runPushTest("__tests__/__resources__/ExampleBundle01", true, "PUSH operation completed", parms);
981981

982982
expect(consoleText).toContain("Making remote bundle directory '/u/ThisDoesNotExist/12345678'");
983983
expect(consoleText).toContain("Accessing contents of remote bundle directory");
@@ -1010,7 +1010,7 @@ describe("BundlePusher01", () => {
10101010
submitSpy = jest.spyOn(SubmitJobs, "submitJclString").mockImplementation(() =>
10111011
[{ddName: "SYSTSPRT", stepName: "DFHDPLOY", data: "DFHRL2012I http://www.ibm.com/xmlns/prod/cics/bundle/NODEJSAPP"}] );
10121012

1013-
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed.");
1013+
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed");
10141014

10151015
expect(zosMFSpy).toHaveBeenCalledTimes(1);
10161016
expect(sshSpy).toHaveBeenCalledTimes(1);
@@ -1031,7 +1031,7 @@ describe("BundlePusher01", () => {
10311031
submitSpy = jest.spyOn(SubmitJobs, "submitJclString").mockImplementation(() =>
10321032
[{ddName: "SYSTSPRT", stepName: "DFHDPLOY", data: "DFHRL2012I http://www.ibm.com/xmlns/prod/cics/bundle/NODEJSAPP"}] );
10331033

1034-
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed.");
1034+
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed");
10351035

10361036
expect(zosMFSpy).toHaveBeenCalledTimes(1);
10371037
expect(sshSpy).toHaveBeenCalledTimes(1);
@@ -1072,9 +1072,9 @@ describe("BundlePusher01", () => {
10721072
}
10731073
});
10741074

1075-
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed.");
1075+
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed");
10761076

1077-
expect(consoleText).toContain("CICS Regions in Scope '12345678' of CICSplex '12345678':");
1077+
expect(consoleText).toContain("Regions in scope '12345678' of CICSplex '12345678':");
10781078
expect(consoleText).toContain("Applid: ABCDEFG jobname: MYCICS jobid: JOB12345");
10791079
expect(consoleText).not.toContain("NODEJSAPP");
10801080
expect(zosMFSpy).toHaveBeenCalledTimes(1);
@@ -1098,16 +1098,16 @@ describe("BundlePusher01", () => {
10981098
const parms = getCommonParmsForPushTests();
10991099
parms.arguments.verbose = true;
11001100

1101-
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed.", parms);
1101+
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed", parms);
11021102

11031103
expect(consoleText).toContain("Making remote bundle directory '/u/ThisDoesNotExist/12345678'");
11041104
expect(consoleText).toContain("Accessing contents of remote bundle directory");
11051105
expect(consoleText).toContain("Uploading bundle contents to remote directory");
11061106
expect(consoleText).toContain("WARNING: No .zosAttributes file found in the bundle directory, default values will be applied");
11071107
expect(consoleText).toContain("Deploying bundle '12345678' to CICS");
11081108
expect(consoleText).toContain("Deploy complete");
1109-
expect(consoleText).toContain("Gathering Scope information");
1110-
expect(consoleText).toContain("Querying Regions in Scope over CMCI");
1109+
expect(consoleText).toContain("Gathering scope information");
1110+
expect(consoleText).toContain("Querying regions in scope over CMCI");
11111111
expect(zosMFSpy).toHaveBeenCalledTimes(1);
11121112
expect(sshSpy).toHaveBeenCalledTimes(1);
11131113
expect(listSpy).toHaveBeenCalledTimes(1);
@@ -1161,9 +1161,9 @@ describe("BundlePusher01", () => {
11611161
expect(consoleText).toContain("WARNING: No .zosAttributes file found in the bundle directory, default values will be applied");
11621162
expect(consoleText).toContain("Deploying bundle '12345678' to CICS");
11631163
expect(consoleText).toContain("Deploy ended with errors");
1164-
expect(consoleText).toContain("Gathering Scope information");
1165-
expect(consoleText).toContain("Querying Regions in Scope over CMCI");
1166-
expect(consoleText).toContain("CICS Regions in Scope '12345678' of CICSplex '12345678':");
1164+
expect(consoleText).toContain("Gathering scope information");
1165+
expect(consoleText).toContain("Querying regions in scope over CMCI");
1166+
expect(consoleText).toContain("Regions in scope '12345678' of CICSplex '12345678':");
11671167
expect(consoleText).toContain("Applid: ABCDEFG jobname: MYCICS jobid: JOB12345");
11681168
expect(consoleText).toContain("Querying NODEJSAPP resources over CMCI");
11691169
expect(consoleText).toContain("zowe cics get resource CICSNodejsapp --region-name 12345678 --criteria \"BUNDLE=12345678\" --cics-plex 12345678");
@@ -1187,7 +1187,7 @@ describe("BundlePusher01", () => {
11871187
[{ddName: "SYSTSPRT", stepName: "DFHDPLOY", data: "DFHRL2012I http://www.ibm.com/xmlns/prod/cics/bundle/NODEJSAPP"}] );
11881188
cmciSpy.mockImplementationOnce(() => { throw new Error("Injected CMCI GET error"); });
11891189

1190-
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed.");
1190+
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed");
11911191

11921192
expect(zosMFSpy).toHaveBeenCalledTimes(1);
11931193
expect(sshSpy).toHaveBeenCalledTimes(1);
@@ -1233,7 +1233,7 @@ describe("BundlePusher01", () => {
12331233
}
12341234
});
12351235

1236-
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed.");
1236+
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed");
12371237

12381238
expect(consoleText).toContain("zowe cics get resource CICSNodejsapp --region-name 12345678 --criteria \"BUNDLE=12345678\" --cics-plex 12345678");
12391239
expect(zosMFSpy).toHaveBeenCalledTimes(1);
@@ -1280,7 +1280,7 @@ describe("BundlePusher01", () => {
12801280
}
12811281
});
12821282

1283-
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed.");
1283+
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed");
12841284

12851285
expect(consoleText).toContain("zowe cics get resource CICSNodejsapp --region-name 12345678 --criteria \"BUNDLE=12345678\" --cics-plex 12345678");
12861286
expect(zosMFSpy).toHaveBeenCalledTimes(1);
@@ -1334,12 +1334,12 @@ describe("BundlePusher01", () => {
13341334
}
13351335
});
13361336

1337-
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed.");
1337+
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed");
13381338

1339-
expect(consoleText).toContain("CICS Regions in Scope '12345678' of CICSplex '12345678':");
1339+
expect(consoleText).toContain("Regions in scope '12345678' of CICSplex '12345678':");
13401340
expect(consoleText).toContain("Applid: ABCDEFG jobname: MYCICS jobid: JOB12345");
1341-
expect(consoleText).toContain("NODEJSAPP resources for Bundle '12345678' in Scope '12345678':");
1342-
expect(consoleText).toContain("CICS NODEJSAPP resource 'name' is in 'ENABLED' state in region '1' with process id '22'");
1341+
expect(consoleText).toContain("NODEJSAPP resources for bundle '12345678' in scope '12345678':");
1342+
expect(consoleText).toContain("NODEJSAPP resource 'name' is in 'ENABLED' state in region '1' with process id '22'");
13431343
expect(consoleText).toContain("stdout: /tmp/stdout");
13441344
expect(consoleText).toContain("stderr: /tmp/stderr");
13451345
expect(zosMFSpy).toHaveBeenCalledTimes(1);
@@ -1393,12 +1393,12 @@ describe("BundlePusher01", () => {
13931393
}
13941394
});
13951395

1396-
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed.");
1396+
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed");
13971397

1398-
expect(consoleText).toContain("CICS Regions in Scope '12345678' of CICSplex '12345678':");
1398+
expect(consoleText).toContain("Regions in scope '12345678' of CICSplex '12345678':");
13991399
expect(consoleText).toContain("Applid: ABCD jobname: MYCICS jobid: JOB12345");
1400-
expect(consoleText).toContain("NODEJSAPP resources for Bundle '12345678' in Scope '12345678':");
1401-
expect(consoleText).toContain("CICS NODEJSAPP resource 'name' is in 'DISABLED' state in region '1' with process id '0'.");
1400+
expect(consoleText).toContain("NODEJSAPP resources for bundle '12345678' in scope '12345678':");
1401+
expect(consoleText).toContain("NODEJSAPP resource 'name' is in 'DISABLED' state in region '1' with process id '0'.");
14021402
expect(consoleText).toContain("stdout: <not available>");
14031403
expect(consoleText).toContain("stderr: <not available>");
14041404
expect(zosMFSpy).toHaveBeenCalledTimes(1);
@@ -1463,16 +1463,16 @@ describe("BundlePusher01", () => {
14631463
}
14641464
});
14651465

1466-
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed.");
1466+
await runPushTest("__tests__/__resources__/ExampleBundle01", false, "PUSH operation completed");
14671467

1468-
expect(consoleText).toContain("CICS Regions in Scope '12345678' of CICSplex '12345678':");
1468+
expect(consoleText).toContain("Regions in scope '12345678' of CICSplex '12345678':");
14691469
expect(consoleText).toContain("Applid: ABCD jobname: MYCICS jobid: JOB12345");
14701470
expect(consoleText).toContain("Applid: EFGHIHJK jobname: MYCICS2 jobid: JOB54321");
1471-
expect(consoleText).toContain("NODEJSAPP resources for Bundle '12345678' in Scope '12345678':");
1472-
expect(consoleText).toContain("CICS NODEJSAPP resource 'name' is in 'ENABLED' state in region '1' with process id '22'.");
1471+
expect(consoleText).toContain("NODEJSAPP resources for bundle '12345678' in scope '12345678':");
1472+
expect(consoleText).toContain("NODEJSAPP resource 'name' is in 'ENABLED' state in region '1' with process id '22'.");
14731473
expect(consoleText).toContain("stdout: /tmp/stdout");
14741474
expect(consoleText).toContain("stderr: /tmp/stderr");
1475-
expect(consoleText).toContain("CICS NODEJSAPP resource 'name2' is in 'ENABLED' state in region '1' with process id '33'.");
1475+
expect(consoleText).toContain("NODEJSAPP resource 'name2' is in 'ENABLED' state in region '1' with process id '33'.");
14761476
expect(consoleText).toContain("stdout: /tmp/name2out");
14771477
expect(consoleText).toContain("stderr: /tmp/name2err");
14781478
expect(zosMFSpy).toHaveBeenCalledTimes(1);

0 commit comments

Comments
 (0)