@@ -114,8 +114,8 @@ describe("BundlePusher01", () => {
114
114
lstatSpy = jest . spyOn ( fs , "lstatSync" ) . mockImplementation ( ( ) => ( IS_NOT_DIRECTORY ) ) ;
115
115
cmciSpy = jest . spyOn ( cmci , "getResource" ) . mockImplementation ( ( ) => ( { response : { records : { } } } ) ) ;
116
116
consoleText = "" ;
117
- zosmfProfile = { } ;
118
- sshProfile = { } ;
117
+ zosmfProfile = { host : "testhost" , user : "testuser" } ;
118
+ sshProfile = { host : "testhost" , user : "testuser" } ;
119
119
cicsProfile = undefined ;
120
120
} ) ;
121
121
afterEach ( ( ) => {
@@ -210,29 +210,27 @@ describe("BundlePusher01", () => {
210
210
expect ( sshSpy ) . toHaveBeenCalledTimes ( 1 ) ;
211
211
} ) ;
212
212
it ( "should complain with mismatching zOSMF and SSH profile host names" , async ( ) => {
213
- zosmfProfile = { host : "wibble" } ;
214
- sshProfile = { host : "wobble" } ;
213
+ zosmfProfile = { host : "wibble" , user : "user" } ;
214
+ sshProfile = { host : "wobble" , user : "user" } ;
215
215
216
216
await runPushTest ( "__tests__/__resources__/ExampleBundle01" , true ,
217
217
"PUSH operation completed." ) ;
218
218
expect ( consoleText ) . toContain ( "WARNING: ssh profile --host value 'wobble' does not match zosmf value 'wibble'." ) ;
219
219
} ) ;
220
220
it ( "should not complain with matching zOSMF and SSH profile host names" , async ( ) => {
221
- zosmfProfile = { host : "wibble" } ;
222
- sshProfile = { host : "wibble" } ;
221
+ zosmfProfile = { host : "wibble" , user : "user" } ;
222
+ sshProfile = { host : "wibble" , user : "user" } ;
223
223
224
224
await runPushTest ( "__tests__/__resources__/ExampleBundle01" , true ,
225
225
"PUSH operation completed." ) ;
226
226
expect ( consoleText ) . not . toContain ( "WARNING: ssh profile" ) ;
227
227
} ) ;
228
228
it ( "should complain with mismatching zOSMF and CICS profile host names" , async ( ) => {
229
- zosmfProfile = { host : "wibble" } ;
230
- sshProfile = { host : "wibble" } ;
231
- cicsProfile = { host : "wobble" , user : "user" , password : "thisIsntReal" , cicsPlex : "12345678" , regionName : "12345678" } ;
229
+ cicsProfile = { host : "wibble" , user : "testuser" , password : "thisIsntReal" , cicsPlex : "12345678" , regionName : "12345678" } ;
232
230
233
231
await runPushTest ( "__tests__/__resources__/ExampleBundle01" , true ,
234
232
"PUSH operation completed." ) ;
235
- expect ( consoleText ) . toContain ( "WARNING: cics profile --host value 'wobble ' does not match zosmf value 'wibble '." ) ;
233
+ expect ( consoleText ) . toContain ( "WARNING: cics profile --host value 'wibble ' does not match zosmf value 'testhost '." ) ;
236
234
} ) ;
237
235
it ( "should not complain with matching zOSMF and CICS profile host names" , async ( ) => {
238
236
zosmfProfile = { host : "wibble" , user : "user" } ;
@@ -259,6 +257,14 @@ describe("BundlePusher01", () => {
259
257
"PUSH operation completed." ) ;
260
258
expect ( consoleText ) . not . toContain ( "WARNING: ssh profile" ) ;
261
259
} ) ;
260
+ it ( "should not complain with matching zOSMF and SSH profile user names - case" , async ( ) => {
261
+ zosmfProfile = { host : "wibble" , user : "fred" } ;
262
+ sshProfile = { host : "wibble" , user : "FRED" } ;
263
+
264
+ await runPushTest ( "__tests__/__resources__/ExampleBundle01" , true ,
265
+ "PUSH operation completed." ) ;
266
+ expect ( consoleText ) . not . toContain ( "WARNING: ssh profile" ) ;
267
+ } ) ;
262
268
it ( "should complain with mismatching zOSMF and CICS profile user names" , async ( ) => {
263
269
zosmfProfile = { host : "wibble" , user : "fred" } ;
264
270
sshProfile = { host : "wibble" , user : "fred" } ;
0 commit comments