@@ -251,19 +251,55 @@ describe("BundleDeployer01", () => {
251
251
"1234567890123456789012345678901234567890123456789012345" ;
252
252
await testDeployJCL ( parms ) ;
253
253
} ) ;
254
- it ( "should generate undeploy JCL for csdgroup" , async ( ) => {
254
+ it ( "should generate deploy JCL for AVAILABLE" , async ( ) => {
255
+
256
+ let parms : IHandlerParameters ;
257
+ parms = DEFAULT_PARAMTERS ;
258
+ setCommonParmsForDeployTests ( parms ) ;
259
+ parms . arguments . targetstate = "AVAILABLE" ;
260
+ parms . arguments . resgroup = "12345678" ;
261
+ await testDeployJCL ( parms ) ;
262
+ } ) ;
263
+ it ( "should generate deploy JCL for ENABLED" , async ( ) => {
264
+
265
+ let parms : IHandlerParameters ;
266
+ parms = DEFAULT_PARAMTERS ;
267
+ setCommonParmsForDeployTests ( parms ) ;
268
+ parms . arguments . targetstate = "ENABLED" ;
269
+ parms . arguments . resgroup = "12345678" ;
270
+ await testDeployJCL ( parms ) ;
271
+ } ) ;
272
+ it ( "should generate deploy JCL for DISABLED" , async ( ) => {
255
273
256
274
let parms : IHandlerParameters ;
257
275
parms = DEFAULT_PARAMTERS ;
258
276
setCommonParmsForDeployTests ( parms ) ;
277
+ parms . arguments . targetstate = "DISABLED" ;
278
+ parms . arguments . resgroup = "12345678" ;
279
+ await testDeployJCL ( parms ) ;
280
+ } ) ;
281
+ it ( "should generate deploy JCL for mixed case" , async ( ) => {
282
+
283
+ let parms : IHandlerParameters ;
284
+ parms = DEFAULT_PARAMTERS ;
285
+ setCommonParmsForDeployTests ( parms ) ;
286
+ parms . arguments . targetstate = "disabled" ;
287
+ parms . arguments . resgroup = "12345678" ;
288
+ await testDeployJCL ( parms ) ;
289
+ } ) ;
290
+ it ( "should generate undeploy JCL for csdgroup" , async ( ) => {
291
+
292
+ let parms : IHandlerParameters ;
293
+ parms = DEFAULT_PARAMTERS ;
294
+ setCommonParmsForUndeployTests ( parms ) ;
259
295
parms . arguments . csdgroup = "12345678" ;
260
296
await testUndeployJCL ( parms ) ;
261
297
} ) ;
262
298
it ( "should generate undeploy JCL for csdgroup with timeout" , async ( ) => {
263
299
264
300
let parms : IHandlerParameters ;
265
301
parms = DEFAULT_PARAMTERS ;
266
- setCommonParmsForDeployTests ( parms ) ;
302
+ setCommonParmsForUndeployTests ( parms ) ;
267
303
parms . arguments . csdgroup = "12345678" ;
268
304
parms . arguments . timeout = 1500 ;
269
305
await testUndeployJCL ( parms ) ;
@@ -272,19 +308,55 @@ describe("BundleDeployer01", () => {
272
308
273
309
let parms : IHandlerParameters ;
274
310
parms = DEFAULT_PARAMTERS ;
275
- setCommonParmsForDeployTests ( parms ) ;
311
+ setCommonParmsForUndeployTests ( parms ) ;
276
312
parms . arguments . resgroup = "12345678" ;
277
313
await testUndeployJCL ( parms ) ;
278
314
} ) ;
279
315
it ( "should generate undeploy JCL for resgroup with timeout" , async ( ) => {
280
316
281
317
let parms : IHandlerParameters ;
282
318
parms = DEFAULT_PARAMTERS ;
283
- setCommonParmsForDeployTests ( parms ) ;
319
+ setCommonParmsForUndeployTests ( parms ) ;
284
320
parms . arguments . resgroup = "12345678" ;
285
321
parms . arguments . timeout = 1500 ;
286
322
await testUndeployJCL ( parms ) ;
287
323
} ) ;
324
+ it ( "should generate undeploy JCL for UNAVAILABLE" , async ( ) => {
325
+
326
+ let parms : IHandlerParameters ;
327
+ parms = DEFAULT_PARAMTERS ;
328
+ setCommonParmsForDeployTests ( parms ) ;
329
+ parms . arguments . targetstate = "UNAVAILABLE" ;
330
+ parms . arguments . resgroup = "12345678" ;
331
+ await testUndeployJCL ( parms ) ;
332
+ } ) ;
333
+ it ( "should generate undeploy JCL for DISABLED" , async ( ) => {
334
+
335
+ let parms : IHandlerParameters ;
336
+ parms = DEFAULT_PARAMTERS ;
337
+ setCommonParmsForDeployTests ( parms ) ;
338
+ parms . arguments . targetstate = "DISABLED" ;
339
+ parms . arguments . resgroup = "12345678" ;
340
+ await testUndeployJCL ( parms ) ;
341
+ } ) ;
342
+ it ( "should generate undeploy JCL for DISCARDED" , async ( ) => {
343
+
344
+ let parms : IHandlerParameters ;
345
+ parms = DEFAULT_PARAMTERS ;
346
+ setCommonParmsForDeployTests ( parms ) ;
347
+ parms . arguments . targetstate = "DISCARDED" ;
348
+ parms . arguments . resgroup = "12345678" ;
349
+ await testUndeployJCL ( parms ) ;
350
+ } ) ;
351
+ it ( "should generate undeploy JCL for mixed case" , async ( ) => {
352
+
353
+ let parms : IHandlerParameters ;
354
+ parms = DEFAULT_PARAMTERS ;
355
+ setCommonParmsForDeployTests ( parms ) ;
356
+ parms . arguments . targetstate = "discarded" ;
357
+ parms . arguments . resgroup = "12345678" ;
358
+ await testUndeployJCL ( parms ) ;
359
+ } ) ;
288
360
} ) ;
289
361
290
362
async function runDeployTestWithError ( ) {
@@ -348,6 +420,7 @@ async function runUndeployTest() {
348
420
function setCommonParmsForDeployTests ( parms : IHandlerParameters ) {
349
421
setCommonParmsForUndeployTests ( parms ) ;
350
422
parms . arguments . bundledir = "1234567890" ;
423
+ parms . arguments . targetstate = "ENABLED" ;
351
424
}
352
425
353
426
function setCommonParmsForUndeployTests ( parms : IHandlerParameters ) {
@@ -360,6 +433,7 @@ function setCommonParmsForUndeployTests(parms: IHandlerParameters) {
360
433
parms . arguments . timeout = undefined ;
361
434
parms . arguments . name = "12345678" ;
362
435
parms . arguments . jobcard = "//DFHDPLOY JOB DFHDPLOY,CLASS=A,MSGCLASS=X,TIME=NOLIMIT" ;
436
+ parms . arguments . targetstate = "DISCARDED" ;
363
437
}
364
438
365
439
async function testDeployJCL ( parms : IHandlerParameters ) {
0 commit comments