@itentialopensource/adapter-servicenow 2.9.4 → 2.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CALLS.md +114 -0
- package/adapter.js +2102 -0
- package/entities/ChangeManagement/action.json +389 -0
- package/entities/ChangeManagement/schema.json +100 -1
- package/package.json +7 -7
- package/pronghorn.json +1285 -69
- package/report/adapterInfo.json +7 -7
- package/test/integration/adapterTestIntegration.js +484 -0
- package/test/unit/adapterTestUnit.js +673 -3
- package/refs?service=git-upload-pack +0 -0
package/report/adapterInfo.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.9.
|
|
3
|
-
"configLines":
|
|
2
|
+
"version": "2.9.5",
|
|
3
|
+
"configLines": 9622,
|
|
4
4
|
"scriptLines": 1783,
|
|
5
|
-
"codeLines":
|
|
6
|
-
"testLines":
|
|
7
|
-
"testCases":
|
|
8
|
-
"totalCodeLines":
|
|
9
|
-
"wfTasks":
|
|
5
|
+
"codeLines": 15023,
|
|
6
|
+
"testLines": 12996,
|
|
7
|
+
"testCases": 676,
|
|
8
|
+
"totalCodeLines": 29802,
|
|
9
|
+
"wfTasks": 184
|
|
10
10
|
}
|
|
@@ -4229,5 +4229,489 @@ describe('[integration] Servicenow Adapter Test', () => {
|
|
|
4229
4229
|
}).timeout(attemptTimeout);
|
|
4230
4230
|
});
|
|
4231
4231
|
}
|
|
4232
|
+
|
|
4233
|
+
describe('#getChangeRequest - errors', () => {
|
|
4234
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4235
|
+
try {
|
|
4236
|
+
a.getChangeRequest(null, null, null, null, null, null, (data, error) => {
|
|
4237
|
+
try {
|
|
4238
|
+
if (stub) {
|
|
4239
|
+
const displayE = 'Error 400 received on request';
|
|
4240
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-servicenow-connectorRest-handleEndResponse', displayE);
|
|
4241
|
+
} else {
|
|
4242
|
+
runCommonAsserts(data, error);
|
|
4243
|
+
}
|
|
4244
|
+
saveMockData('ChangeManagement', 'getChangeRequest', 'default', data);
|
|
4245
|
+
done();
|
|
4246
|
+
} catch (err) {
|
|
4247
|
+
log.error(`Test Failure: ${err}`);
|
|
4248
|
+
done(err);
|
|
4249
|
+
}
|
|
4250
|
+
});
|
|
4251
|
+
} catch (error) {
|
|
4252
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4253
|
+
done(error);
|
|
4254
|
+
}
|
|
4255
|
+
}).timeout(attemptTimeout);
|
|
4256
|
+
});
|
|
4257
|
+
|
|
4258
|
+
const changeManagementCreateChangeRequestRecordBodyParam = {};
|
|
4259
|
+
describe('#createChangeRequestRecord - errors', () => {
|
|
4260
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4261
|
+
try {
|
|
4262
|
+
a.createChangeRequestRecord(null, null, null, null, null, changeManagementCreateChangeRequestRecordBodyParam, null, (data, error) => {
|
|
4263
|
+
try {
|
|
4264
|
+
if (stub) {
|
|
4265
|
+
const displayE = 'Error 400 received on request';
|
|
4266
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-servicenow-connectorRest-handleEndResponse', displayE);
|
|
4267
|
+
} else {
|
|
4268
|
+
runCommonAsserts(data, error);
|
|
4269
|
+
}
|
|
4270
|
+
saveMockData('ChangeManagement', 'createChangeRequestRecord', 'default', data);
|
|
4271
|
+
done();
|
|
4272
|
+
} catch (err) {
|
|
4273
|
+
log.error(`Test Failure: ${err}`);
|
|
4274
|
+
done(err);
|
|
4275
|
+
}
|
|
4276
|
+
});
|
|
4277
|
+
} catch (error) {
|
|
4278
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4279
|
+
done(error);
|
|
4280
|
+
}
|
|
4281
|
+
}).timeout(attemptTimeout);
|
|
4282
|
+
});
|
|
4283
|
+
|
|
4284
|
+
describe('#getConfigurationItemSchedule - errors', () => {
|
|
4285
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4286
|
+
try {
|
|
4287
|
+
a.getConfigurationItemSchedule('fakedata', null, null, null, (data, error) => {
|
|
4288
|
+
try {
|
|
4289
|
+
if (stub) {
|
|
4290
|
+
const displayE = 'Error 400 received on request';
|
|
4291
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-servicenow-connectorRest-handleEndResponse', displayE);
|
|
4292
|
+
} else {
|
|
4293
|
+
runCommonAsserts(data, error);
|
|
4294
|
+
}
|
|
4295
|
+
saveMockData('ChangeManagement', 'getConfigurationItemSchedule', 'default', data);
|
|
4296
|
+
done();
|
|
4297
|
+
} catch (err) {
|
|
4298
|
+
log.error(`Test Failure: ${err}`);
|
|
4299
|
+
done(err);
|
|
4300
|
+
}
|
|
4301
|
+
});
|
|
4302
|
+
} catch (error) {
|
|
4303
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4304
|
+
done(error);
|
|
4305
|
+
}
|
|
4306
|
+
}).timeout(attemptTimeout);
|
|
4307
|
+
});
|
|
4308
|
+
|
|
4309
|
+
const changeManagementUpdateEmergencyChangeRequestByIdBodyParam = {};
|
|
4310
|
+
describe('#updateEmergencyChangeRequestById - errors', () => {
|
|
4311
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4312
|
+
try {
|
|
4313
|
+
a.updateEmergencyChangeRequestById('fakedata', null, null, changeManagementUpdateEmergencyChangeRequestByIdBodyParam, null, (data, error) => {
|
|
4314
|
+
try {
|
|
4315
|
+
if (stub) {
|
|
4316
|
+
const displayE = 'Error 400 received on request';
|
|
4317
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-servicenow-connectorRest-handleEndResponse', displayE);
|
|
4318
|
+
} else {
|
|
4319
|
+
runCommonAsserts(data, error);
|
|
4320
|
+
}
|
|
4321
|
+
saveMockData('ChangeManagement', 'updateEmergencyChangeRequestById', 'default', data);
|
|
4322
|
+
done();
|
|
4323
|
+
} catch (err) {
|
|
4324
|
+
log.error(`Test Failure: ${err}`);
|
|
4325
|
+
done(err);
|
|
4326
|
+
}
|
|
4327
|
+
});
|
|
4328
|
+
} catch (error) {
|
|
4329
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4330
|
+
done(error);
|
|
4331
|
+
}
|
|
4332
|
+
}).timeout(attemptTimeout);
|
|
4333
|
+
});
|
|
4334
|
+
|
|
4335
|
+
describe('#getChangeModel - errors', () => {
|
|
4336
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4337
|
+
try {
|
|
4338
|
+
a.getChangeModel(null, null, null, null, null, null, (data, error) => {
|
|
4339
|
+
try {
|
|
4340
|
+
if (stub) {
|
|
4341
|
+
const displayE = 'Error 400 received on request';
|
|
4342
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-servicenow-connectorRest-handleEndResponse', displayE);
|
|
4343
|
+
} else {
|
|
4344
|
+
runCommonAsserts(data, error);
|
|
4345
|
+
}
|
|
4346
|
+
saveMockData('ChangeManagement', 'getChangeModel', 'default', data);
|
|
4347
|
+
done();
|
|
4348
|
+
} catch (err) {
|
|
4349
|
+
log.error(`Test Failure: ${err}`);
|
|
4350
|
+
done(err);
|
|
4351
|
+
}
|
|
4352
|
+
});
|
|
4353
|
+
} catch (error) {
|
|
4354
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4355
|
+
done(error);
|
|
4356
|
+
}
|
|
4357
|
+
}).timeout(attemptTimeout);
|
|
4358
|
+
});
|
|
4359
|
+
|
|
4360
|
+
describe('#getChangeModelById - errors', () => {
|
|
4361
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4362
|
+
try {
|
|
4363
|
+
a.getChangeModelById('fakedata', null, (data, error) => {
|
|
4364
|
+
try {
|
|
4365
|
+
if (stub) {
|
|
4366
|
+
const displayE = 'Error 400 received on request';
|
|
4367
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-servicenow-connectorRest-handleEndResponse', displayE);
|
|
4368
|
+
} else {
|
|
4369
|
+
runCommonAsserts(data, error);
|
|
4370
|
+
}
|
|
4371
|
+
saveMockData('ChangeManagement', 'getChangeModelById', 'default', data);
|
|
4372
|
+
done();
|
|
4373
|
+
} catch (err) {
|
|
4374
|
+
log.error(`Test Failure: ${err}`);
|
|
4375
|
+
done(err);
|
|
4376
|
+
}
|
|
4377
|
+
});
|
|
4378
|
+
} catch (error) {
|
|
4379
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4380
|
+
done(error);
|
|
4381
|
+
}
|
|
4382
|
+
}).timeout(attemptTimeout);
|
|
4383
|
+
});
|
|
4384
|
+
|
|
4385
|
+
describe('#getChangeWorkerById - errors', () => {
|
|
4386
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4387
|
+
try {
|
|
4388
|
+
a.getChangeWorkerById('fakedata', null, (data, error) => {
|
|
4389
|
+
try {
|
|
4390
|
+
if (stub) {
|
|
4391
|
+
const displayE = 'Error 400 received on request';
|
|
4392
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-servicenow-connectorRest-handleEndResponse', displayE);
|
|
4393
|
+
} else {
|
|
4394
|
+
runCommonAsserts(data, error);
|
|
4395
|
+
}
|
|
4396
|
+
saveMockData('ChangeManagement', 'getChangeWorkerById', 'default', data);
|
|
4397
|
+
done();
|
|
4398
|
+
} catch (err) {
|
|
4399
|
+
log.error(`Test Failure: ${err}`);
|
|
4400
|
+
done(err);
|
|
4401
|
+
}
|
|
4402
|
+
});
|
|
4403
|
+
} catch (error) {
|
|
4404
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4405
|
+
done(error);
|
|
4406
|
+
}
|
|
4407
|
+
}).timeout(attemptTimeout);
|
|
4408
|
+
});
|
|
4409
|
+
|
|
4410
|
+
const changeManagementUpdateChangeRequestByIdBodyParam = {};
|
|
4411
|
+
describe('#updateChangeRequestById - errors', () => {
|
|
4412
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4413
|
+
try {
|
|
4414
|
+
a.updateChangeRequestById('fakedata', null, null, null, changeManagementUpdateChangeRequestByIdBodyParam, null, (data, error) => {
|
|
4415
|
+
try {
|
|
4416
|
+
if (stub) {
|
|
4417
|
+
const displayE = 'Error 400 received on request';
|
|
4418
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-servicenow-connectorRest-handleEndResponse', displayE);
|
|
4419
|
+
} else {
|
|
4420
|
+
runCommonAsserts(data, error);
|
|
4421
|
+
}
|
|
4422
|
+
saveMockData('ChangeManagement', 'updateChangeRequestById', 'default', data);
|
|
4423
|
+
done();
|
|
4424
|
+
} catch (err) {
|
|
4425
|
+
log.error(`Test Failure: ${err}`);
|
|
4426
|
+
done(err);
|
|
4427
|
+
}
|
|
4428
|
+
});
|
|
4429
|
+
} catch (error) {
|
|
4430
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4431
|
+
done(error);
|
|
4432
|
+
}
|
|
4433
|
+
}).timeout(attemptTimeout);
|
|
4434
|
+
});
|
|
4435
|
+
|
|
4436
|
+
describe('#deleteChangeRequestById - errors', () => {
|
|
4437
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4438
|
+
try {
|
|
4439
|
+
a.deleteChangeRequestById('fakedata', null, (data, error) => {
|
|
4440
|
+
try {
|
|
4441
|
+
if (stub) {
|
|
4442
|
+
const displayE = 'Error 400 received on request';
|
|
4443
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-servicenow-connectorRest-handleEndResponse', displayE);
|
|
4444
|
+
} else {
|
|
4445
|
+
runCommonAsserts(data, error);
|
|
4446
|
+
}
|
|
4447
|
+
saveMockData('ChangeManagement', 'deleteChangeRequestById', 'default', data);
|
|
4448
|
+
done();
|
|
4449
|
+
} catch (err) {
|
|
4450
|
+
log.error(`Test Failure: ${err}`);
|
|
4451
|
+
done(err);
|
|
4452
|
+
}
|
|
4453
|
+
});
|
|
4454
|
+
} catch (error) {
|
|
4455
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4456
|
+
done(error);
|
|
4457
|
+
}
|
|
4458
|
+
}).timeout(attemptTimeout);
|
|
4459
|
+
});
|
|
4460
|
+
|
|
4461
|
+
describe('#getChangeRequestRecordById - errors', () => {
|
|
4462
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4463
|
+
try {
|
|
4464
|
+
a.getChangeRequestRecordById('fakedata', null, (data, error) => {
|
|
4465
|
+
try {
|
|
4466
|
+
if (stub) {
|
|
4467
|
+
const displayE = 'Error 400 received on request';
|
|
4468
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-servicenow-connectorRest-handleEndResponse', displayE);
|
|
4469
|
+
} else {
|
|
4470
|
+
runCommonAsserts(data, error);
|
|
4471
|
+
}
|
|
4472
|
+
saveMockData('ChangeManagement', 'getChangeRequestRecordById', 'default', data);
|
|
4473
|
+
done();
|
|
4474
|
+
} catch (err) {
|
|
4475
|
+
log.error(`Test Failure: ${err}`);
|
|
4476
|
+
done(err);
|
|
4477
|
+
}
|
|
4478
|
+
});
|
|
4479
|
+
} catch (error) {
|
|
4480
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4481
|
+
done(error);
|
|
4482
|
+
}
|
|
4483
|
+
}).timeout(attemptTimeout);
|
|
4484
|
+
});
|
|
4485
|
+
|
|
4486
|
+
const changeManagementAddChangeRequestConfigurationItemBodyParam = {};
|
|
4487
|
+
describe('#addChangeRequestConfigurationItem - errors', () => {
|
|
4488
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4489
|
+
try {
|
|
4490
|
+
a.addChangeRequestConfigurationItem('fakedata', changeManagementAddChangeRequestConfigurationItemBodyParam, null, (data, error) => {
|
|
4491
|
+
try {
|
|
4492
|
+
if (stub) {
|
|
4493
|
+
const displayE = 'Error 400 received on request';
|
|
4494
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-servicenow-connectorRest-handleEndResponse', displayE);
|
|
4495
|
+
} else {
|
|
4496
|
+
runCommonAsserts(data, error);
|
|
4497
|
+
}
|
|
4498
|
+
saveMockData('ChangeManagement', 'addChangeRequestConfigurationItem', 'default', data);
|
|
4499
|
+
done();
|
|
4500
|
+
} catch (err) {
|
|
4501
|
+
log.error(`Test Failure: ${err}`);
|
|
4502
|
+
done(err);
|
|
4503
|
+
}
|
|
4504
|
+
});
|
|
4505
|
+
} catch (error) {
|
|
4506
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4507
|
+
done(error);
|
|
4508
|
+
}
|
|
4509
|
+
}).timeout(attemptTimeout);
|
|
4510
|
+
});
|
|
4511
|
+
|
|
4512
|
+
describe('#getChangeRequestConfigurationItems - errors', () => {
|
|
4513
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4514
|
+
try {
|
|
4515
|
+
a.getChangeRequestConfigurationItems('fakedata', null, null, null, null, null, null, (data, error) => {
|
|
4516
|
+
try {
|
|
4517
|
+
if (stub) {
|
|
4518
|
+
const displayE = 'Error 400 received on request';
|
|
4519
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-servicenow-connectorRest-handleEndResponse', displayE);
|
|
4520
|
+
} else {
|
|
4521
|
+
runCommonAsserts(data, error);
|
|
4522
|
+
}
|
|
4523
|
+
saveMockData('ChangeManagement', 'getChangeRequestConfigurationItems', 'default', data);
|
|
4524
|
+
done();
|
|
4525
|
+
} catch (err) {
|
|
4526
|
+
log.error(`Test Failure: ${err}`);
|
|
4527
|
+
done(err);
|
|
4528
|
+
}
|
|
4529
|
+
});
|
|
4530
|
+
} catch (error) {
|
|
4531
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4532
|
+
done(error);
|
|
4533
|
+
}
|
|
4534
|
+
}).timeout(attemptTimeout);
|
|
4535
|
+
});
|
|
4536
|
+
|
|
4537
|
+
describe('#getChangeRequestNextStates - errors', () => {
|
|
4538
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4539
|
+
try {
|
|
4540
|
+
a.getChangeRequestNextStates('fakedata', null, (data, error) => {
|
|
4541
|
+
try {
|
|
4542
|
+
if (stub) {
|
|
4543
|
+
const displayE = 'Error 400 received on request';
|
|
4544
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-servicenow-connectorRest-handleEndResponse', displayE);
|
|
4545
|
+
} else {
|
|
4546
|
+
runCommonAsserts(data, error);
|
|
4547
|
+
}
|
|
4548
|
+
saveMockData('ChangeManagement', 'getChangeRequestNextStates', 'default', data);
|
|
4549
|
+
done();
|
|
4550
|
+
} catch (err) {
|
|
4551
|
+
log.error(`Test Failure: ${err}`);
|
|
4552
|
+
done(err);
|
|
4553
|
+
}
|
|
4554
|
+
});
|
|
4555
|
+
} catch (error) {
|
|
4556
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4557
|
+
done(error);
|
|
4558
|
+
}
|
|
4559
|
+
}).timeout(attemptTimeout);
|
|
4560
|
+
});
|
|
4561
|
+
|
|
4562
|
+
const changeManagementRefreshChangeRequestImpactedServicesBodyParam = {};
|
|
4563
|
+
describe('#refreshChangeRequestImpactedServices - errors', () => {
|
|
4564
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4565
|
+
try {
|
|
4566
|
+
a.refreshChangeRequestImpactedServices('fakedata', changeManagementRefreshChangeRequestImpactedServicesBodyParam, null, (data, error) => {
|
|
4567
|
+
try {
|
|
4568
|
+
if (stub) {
|
|
4569
|
+
const displayE = 'Error 400 received on request';
|
|
4570
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-servicenow-connectorRest-handleEndResponse', displayE);
|
|
4571
|
+
} else {
|
|
4572
|
+
runCommonAsserts(data, error);
|
|
4573
|
+
}
|
|
4574
|
+
saveMockData('ChangeManagement', 'refreshChangeRequestImpactedServices', 'default', data);
|
|
4575
|
+
done();
|
|
4576
|
+
} catch (err) {
|
|
4577
|
+
log.error(`Test Failure: ${err}`);
|
|
4578
|
+
done(err);
|
|
4579
|
+
}
|
|
4580
|
+
});
|
|
4581
|
+
} catch (error) {
|
|
4582
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4583
|
+
done(error);
|
|
4584
|
+
}
|
|
4585
|
+
}).timeout(attemptTimeout);
|
|
4586
|
+
});
|
|
4587
|
+
|
|
4588
|
+
describe('#getChangeRequestSchedule - errors', () => {
|
|
4589
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4590
|
+
try {
|
|
4591
|
+
a.getChangeRequestSchedule('fakedata', null, (data, error) => {
|
|
4592
|
+
try {
|
|
4593
|
+
if (stub) {
|
|
4594
|
+
const displayE = 'Error 400 received on request';
|
|
4595
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-servicenow-connectorRest-handleEndResponse', displayE);
|
|
4596
|
+
} else {
|
|
4597
|
+
runCommonAsserts(data, error);
|
|
4598
|
+
}
|
|
4599
|
+
saveMockData('ChangeManagement', 'getChangeRequestSchedule', 'default', data);
|
|
4600
|
+
done();
|
|
4601
|
+
} catch (err) {
|
|
4602
|
+
log.error(`Test Failure: ${err}`);
|
|
4603
|
+
done(err);
|
|
4604
|
+
}
|
|
4605
|
+
});
|
|
4606
|
+
} catch (error) {
|
|
4607
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4608
|
+
done(error);
|
|
4609
|
+
}
|
|
4610
|
+
}).timeout(attemptTimeout);
|
|
4611
|
+
});
|
|
4612
|
+
|
|
4613
|
+
const changeManagementUpdateChangeRequestFirstAvailableScheduleBodyParam = {};
|
|
4614
|
+
describe('#updateChangeRequestFirstAvailableSchedule - errors', () => {
|
|
4615
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4616
|
+
try {
|
|
4617
|
+
a.updateChangeRequestFirstAvailableSchedule('fakedata', changeManagementUpdateChangeRequestFirstAvailableScheduleBodyParam, null, (data, error) => {
|
|
4618
|
+
try {
|
|
4619
|
+
if (stub) {
|
|
4620
|
+
const displayE = 'Error 400 received on request';
|
|
4621
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-servicenow-connectorRest-handleEndResponse', displayE);
|
|
4622
|
+
} else {
|
|
4623
|
+
runCommonAsserts(data, error);
|
|
4624
|
+
}
|
|
4625
|
+
saveMockData('ChangeManagement', 'updateChangeRequestFirstAvailableSchedule', 'default', data);
|
|
4626
|
+
done();
|
|
4627
|
+
} catch (err) {
|
|
4628
|
+
log.error(`Test Failure: ${err}`);
|
|
4629
|
+
done(err);
|
|
4630
|
+
}
|
|
4631
|
+
});
|
|
4632
|
+
} catch (error) {
|
|
4633
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4634
|
+
done(error);
|
|
4635
|
+
}
|
|
4636
|
+
}).timeout(attemptTimeout);
|
|
4637
|
+
});
|
|
4638
|
+
|
|
4639
|
+
const changeManagementUpdateChangeTaskByTaskIdBodyParam = {};
|
|
4640
|
+
describe('#updateChangeTaskByTaskId - errors', () => {
|
|
4641
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4642
|
+
try {
|
|
4643
|
+
a.updateChangeTaskByTaskId('fakedata', 'fakedata', null, null, changeManagementUpdateChangeTaskByTaskIdBodyParam, null, (data, error) => {
|
|
4644
|
+
try {
|
|
4645
|
+
if (stub) {
|
|
4646
|
+
const displayE = 'Error 400 received on request';
|
|
4647
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-servicenow-connectorRest-handleEndResponse', displayE);
|
|
4648
|
+
} else {
|
|
4649
|
+
runCommonAsserts(data, error);
|
|
4650
|
+
}
|
|
4651
|
+
saveMockData('ChangeManagement', 'updateChangeTaskByTaskId', 'default', data);
|
|
4652
|
+
done();
|
|
4653
|
+
} catch (err) {
|
|
4654
|
+
log.error(`Test Failure: ${err}`);
|
|
4655
|
+
done(err);
|
|
4656
|
+
}
|
|
4657
|
+
});
|
|
4658
|
+
} catch (error) {
|
|
4659
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4660
|
+
done(error);
|
|
4661
|
+
}
|
|
4662
|
+
}).timeout(attemptTimeout);
|
|
4663
|
+
});
|
|
4664
|
+
|
|
4665
|
+
const changeManagementUpdateChangeRequestRiskBodyParam = {};
|
|
4666
|
+
describe('#updateChangeRequestRisk - errors', () => {
|
|
4667
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4668
|
+
try {
|
|
4669
|
+
a.updateChangeRequestRisk('fakedata', changeManagementUpdateChangeRequestRiskBodyParam, null, (data, error) => {
|
|
4670
|
+
try {
|
|
4671
|
+
if (stub) {
|
|
4672
|
+
const displayE = 'Error 400 received on request';
|
|
4673
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-servicenow-connectorRest-handleEndResponse', displayE);
|
|
4674
|
+
} else {
|
|
4675
|
+
runCommonAsserts(data, error);
|
|
4676
|
+
}
|
|
4677
|
+
saveMockData('ChangeManagement', 'updateChangeRequestRisk', 'default', data);
|
|
4678
|
+
done();
|
|
4679
|
+
} catch (err) {
|
|
4680
|
+
log.error(`Test Failure: ${err}`);
|
|
4681
|
+
done(err);
|
|
4682
|
+
}
|
|
4683
|
+
});
|
|
4684
|
+
} catch (error) {
|
|
4685
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4686
|
+
done(error);
|
|
4687
|
+
}
|
|
4688
|
+
}).timeout(attemptTimeout);
|
|
4689
|
+
});
|
|
4690
|
+
|
|
4691
|
+
const changeManagementUpdateStandardChangeRequestByIdBodyParam = {};
|
|
4692
|
+
describe('#updateStandardChangeRequestById - errors', () => {
|
|
4693
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
4694
|
+
try {
|
|
4695
|
+
a.updateStandardChangeRequestById('fakedata', null, null, changeManagementUpdateStandardChangeRequestByIdBodyParam, null, (data, error) => {
|
|
4696
|
+
try {
|
|
4697
|
+
if (stub) {
|
|
4698
|
+
const displayE = 'Error 400 received on request';
|
|
4699
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-servicenow-connectorRest-handleEndResponse', displayE);
|
|
4700
|
+
} else {
|
|
4701
|
+
runCommonAsserts(data, error);
|
|
4702
|
+
}
|
|
4703
|
+
saveMockData('ChangeManagement', 'updateStandardChangeRequestById', 'default', data);
|
|
4704
|
+
done();
|
|
4705
|
+
} catch (err) {
|
|
4706
|
+
log.error(`Test Failure: ${err}`);
|
|
4707
|
+
done(err);
|
|
4708
|
+
}
|
|
4709
|
+
});
|
|
4710
|
+
} catch (error) {
|
|
4711
|
+
log.error(`Adapter Exception: ${error}`);
|
|
4712
|
+
done(error);
|
|
4713
|
+
}
|
|
4714
|
+
}).timeout(attemptTimeout);
|
|
4715
|
+
});
|
|
4232
4716
|
});
|
|
4233
4717
|
});
|