@@ -380,7 +380,7 @@ describe("BundlePusher01", () => {
380
380
shellSpy . mockImplementationOnce ( ( ) => { throw new Error ( "Injected Shell error" ) ; } ) ;
381
381
382
382
await runPushTestWithError ( "__tests__/__resources__/ExampleBundle01" , true ,
383
- "A problem occurred attempting to run 'rm -r *' in remote directory '/u/ThisDoesNotExist/12345678'. Problem is: Injected Shell error" ) ;
383
+ "A problem occurred attempting to run 'if [ \"$(ls)\" ]; then rm -r *; fi ' in remote directory '/u/ThisDoesNotExist/12345678'. Problem is: Injected Shell error" ) ;
384
384
385
385
expect ( zosMFSpy ) . toHaveBeenCalledTimes ( 1 ) ;
386
386
expect ( sshSpy ) . toHaveBeenCalledTimes ( 1 ) ;
@@ -414,7 +414,7 @@ describe("BundlePusher01", () => {
414
414
} ) ;
415
415
416
416
await runPushTestWithError ( "__tests__/__resources__/ExampleBundle01" , true ,
417
- "A problem occurred attempting to run 'rm -r *' in remote directory '/u/ThisDoesNotExist/12345678'. " +
417
+ "A problem occurred attempting to run 'if [ \"$(ls)\" ]; then rm -r *; fi ' in remote directory '/u/ThisDoesNotExist/12345678'. " +
418
418
"Problem is: The output from the remote command implied that an error occurred." ) ;
419
419
420
420
expect ( consoleText ) . toContain ( "Ssh command exit with non zero status" ) ;
@@ -433,7 +433,7 @@ describe("BundlePusher01", () => {
433
433
} ) ;
434
434
435
435
await runPushTestWithError ( "__tests__/__resources__/ExampleBundle01" , true ,
436
- "A problem occurred attempting to run 'rm -r *' in remote directory '/u/ThisDoesNotExist/12345678'. " +
436
+ "A problem occurred attempting to run 'if [ \"$(ls)\" ]; then rm -r *; fi ' in remote directory '/u/ThisDoesNotExist/12345678'. " +
437
437
"Problem is: The output from the remote command implied that an error occurred." ) ;
438
438
439
439
expect ( consoleText ) . toContain ( "Injected FSUM9195 error message" ) ;
@@ -452,7 +452,7 @@ describe("BundlePusher01", () => {
452
452
} ) ;
453
453
454
454
await runPushTestWithError ( "__tests__/__resources__/ExampleBundle01" , true ,
455
- "A problem occurred attempting to run 'rm -r *' in remote directory '/u/ThisDoesNotExist/12345678'. " +
455
+ "A problem occurred attempting to run 'if [ \"$(ls)\" ]; then rm -r *; fi ' in remote directory '/u/ThisDoesNotExist/12345678'. " +
456
456
"Problem is: The output from the remote command implied that an error occurred." ) ;
457
457
458
458
expect ( consoleText ) . toContain ( "Injected FSUM9195 and FSUM9196 error message" ) ;
@@ -892,7 +892,7 @@ describe("BundlePusher01", () => {
892
892
expect ( consoleText ) . toContain ( "Undeploy complete" ) ;
893
893
expect ( consoleText ) . toContain ( "Running 'npm uninstall *' in '/u/ThisDoesNotExist/12345678'" ) ;
894
894
expect ( consoleText ) . toContain ( "Removing contents of remote bundle directory" ) ;
895
- expect ( consoleText ) . toContain ( "Issuing SSH command 'rm -r *' in remote directory '/u/ThisDoesNotExist/12345678'" ) ;
895
+ expect ( consoleText ) . toContain ( "Issuing SSH command 'if [ \"$(ls)\" ]; then rm -r *; fi ' in remote directory '/u/ThisDoesNotExist/12345678'" ) ;
896
896
expect ( consoleText ) . toContain ( "Uploading bundle contents to remote directory" ) ;
897
897
expect ( consoleText ) . toContain ( "WARNING: No .zosAttributes file found in the bundle directory, default values will be applied" ) ;
898
898
expect ( consoleText ) . toContain ( "Running 'npm install' in '/u/ThisDoesNotExist/12345678'" ) ;
0 commit comments