@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
|
@@ -319,15 +319,15 @@ describe('[unit] Servicenow Adapter Test', () => {
|
|
|
319
319
|
assert.notEqual(null, packageDotJson.dependencies);
|
|
320
320
|
assert.notEqual('', packageDotJson.dependencies);
|
|
321
321
|
assert.equal('^8.17.1', packageDotJson.dependencies.ajv);
|
|
322
|
-
assert.equal('^1.
|
|
322
|
+
assert.equal('^1.8.2', packageDotJson.dependencies.axios);
|
|
323
323
|
assert.equal('^11.0.0', packageDotJson.dependencies.commander);
|
|
324
324
|
assert.equal('^11.2.0', packageDotJson.dependencies['fs-extra']);
|
|
325
|
-
assert.equal('^10.
|
|
325
|
+
assert.equal('^10.8.2', packageDotJson.dependencies.mocha);
|
|
326
326
|
assert.equal('^2.0.1', packageDotJson.dependencies['mocha-param']);
|
|
327
327
|
assert.equal('^0.4.4', packageDotJson.dependencies.ping);
|
|
328
328
|
assert.equal('^1.4.10', packageDotJson.dependencies['readline-sync']);
|
|
329
329
|
assert.equal('^7.6.3', packageDotJson.dependencies.semver);
|
|
330
|
-
assert.equal('^3.
|
|
330
|
+
assert.equal('^3.17.0', packageDotJson.dependencies.winston);
|
|
331
331
|
done();
|
|
332
332
|
} catch (error) {
|
|
333
333
|
log.error(`Test Failure: ${error}`);
|
|
@@ -6375,5 +6375,675 @@ describe('[unit] Servicenow Adapter Test', () => {
|
|
|
6375
6375
|
}
|
|
6376
6376
|
}).timeout(attemptTimeout);
|
|
6377
6377
|
});
|
|
6378
|
+
|
|
6379
|
+
describe('#getChangeRequest - errors', () => {
|
|
6380
|
+
it('should have a getChangeRequest function', (done) => {
|
|
6381
|
+
try {
|
|
6382
|
+
assert.equal(true, typeof a.getChangeRequest === 'function');
|
|
6383
|
+
done();
|
|
6384
|
+
} catch (error) {
|
|
6385
|
+
log.error(`Test Failure: ${error}`);
|
|
6386
|
+
done(error);
|
|
6387
|
+
}
|
|
6388
|
+
}).timeout(attemptTimeout);
|
|
6389
|
+
});
|
|
6390
|
+
|
|
6391
|
+
describe('#createChangeRequestRecord - errors', () => {
|
|
6392
|
+
it('should have a createChangeRequestRecord function', (done) => {
|
|
6393
|
+
try {
|
|
6394
|
+
assert.equal(true, typeof a.createChangeRequestRecord === 'function');
|
|
6395
|
+
done();
|
|
6396
|
+
} catch (error) {
|
|
6397
|
+
log.error(`Test Failure: ${error}`);
|
|
6398
|
+
done(error);
|
|
6399
|
+
}
|
|
6400
|
+
}).timeout(attemptTimeout);
|
|
6401
|
+
it('should error if - missing body', (done) => {
|
|
6402
|
+
try {
|
|
6403
|
+
a.createChangeRequestRecord('fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', null, null, (data, error) => {
|
|
6404
|
+
try {
|
|
6405
|
+
const displayE = 'body is required';
|
|
6406
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-createChangeRequestRecord', displayE);
|
|
6407
|
+
done();
|
|
6408
|
+
} catch (err) {
|
|
6409
|
+
log.error(`Test Failure: ${err}`);
|
|
6410
|
+
done(err);
|
|
6411
|
+
}
|
|
6412
|
+
});
|
|
6413
|
+
} catch (error) {
|
|
6414
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6415
|
+
done(error);
|
|
6416
|
+
}
|
|
6417
|
+
}).timeout(attemptTimeout);
|
|
6418
|
+
});
|
|
6419
|
+
|
|
6420
|
+
describe('#getConfigurationItemSchedule - errors', () => {
|
|
6421
|
+
it('should have a getConfigurationItemSchedule function', (done) => {
|
|
6422
|
+
try {
|
|
6423
|
+
assert.equal(true, typeof a.getConfigurationItemSchedule === 'function');
|
|
6424
|
+
done();
|
|
6425
|
+
} catch (error) {
|
|
6426
|
+
log.error(`Test Failure: ${error}`);
|
|
6427
|
+
done(error);
|
|
6428
|
+
}
|
|
6429
|
+
}).timeout(attemptTimeout);
|
|
6430
|
+
it('should error if - missing cmdbCiSysId', (done) => {
|
|
6431
|
+
try {
|
|
6432
|
+
a.getConfigurationItemSchedule(null, null, null, null, (data, error) => {
|
|
6433
|
+
try {
|
|
6434
|
+
const displayE = 'cmdbCiSysId is required';
|
|
6435
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-getConfigurationItemSchedule', displayE);
|
|
6436
|
+
done();
|
|
6437
|
+
} catch (err) {
|
|
6438
|
+
log.error(`Test Failure: ${err}`);
|
|
6439
|
+
done(err);
|
|
6440
|
+
}
|
|
6441
|
+
});
|
|
6442
|
+
} catch (error) {
|
|
6443
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6444
|
+
done(error);
|
|
6445
|
+
}
|
|
6446
|
+
}).timeout(attemptTimeout);
|
|
6447
|
+
});
|
|
6448
|
+
|
|
6449
|
+
describe('#updateEmergencyChangeRequestById - errors', () => {
|
|
6450
|
+
it('should have a updateEmergencyChangeRequestById function', (done) => {
|
|
6451
|
+
try {
|
|
6452
|
+
assert.equal(true, typeof a.updateEmergencyChangeRequestById === 'function');
|
|
6453
|
+
done();
|
|
6454
|
+
} catch (error) {
|
|
6455
|
+
log.error(`Test Failure: ${error}`);
|
|
6456
|
+
done(error);
|
|
6457
|
+
}
|
|
6458
|
+
}).timeout(attemptTimeout);
|
|
6459
|
+
it('should error if - missing sysId', (done) => {
|
|
6460
|
+
try {
|
|
6461
|
+
a.updateEmergencyChangeRequestById(null, null, null, null, null, (data, error) => {
|
|
6462
|
+
try {
|
|
6463
|
+
const displayE = 'sysId is required';
|
|
6464
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-updateEmergencyChangeRequestById', displayE);
|
|
6465
|
+
done();
|
|
6466
|
+
} catch (err) {
|
|
6467
|
+
log.error(`Test Failure: ${err}`);
|
|
6468
|
+
done(err);
|
|
6469
|
+
}
|
|
6470
|
+
});
|
|
6471
|
+
} catch (error) {
|
|
6472
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6473
|
+
done(error);
|
|
6474
|
+
}
|
|
6475
|
+
}).timeout(attemptTimeout);
|
|
6476
|
+
it('should error if - missing body', (done) => {
|
|
6477
|
+
try {
|
|
6478
|
+
a.updateEmergencyChangeRequestById('fakeparam', 'fakeparam', 'fakeparam', null, null, (data, error) => {
|
|
6479
|
+
try {
|
|
6480
|
+
const displayE = 'body is required';
|
|
6481
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-updateEmergencyChangeRequestById', displayE);
|
|
6482
|
+
done();
|
|
6483
|
+
} catch (err) {
|
|
6484
|
+
log.error(`Test Failure: ${err}`);
|
|
6485
|
+
done(err);
|
|
6486
|
+
}
|
|
6487
|
+
});
|
|
6488
|
+
} catch (error) {
|
|
6489
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6490
|
+
done(error);
|
|
6491
|
+
}
|
|
6492
|
+
}).timeout(attemptTimeout);
|
|
6493
|
+
});
|
|
6494
|
+
|
|
6495
|
+
describe('#getChangeModel - errors', () => {
|
|
6496
|
+
it('should have a getChangeModel function', (done) => {
|
|
6497
|
+
try {
|
|
6498
|
+
assert.equal(true, typeof a.getChangeModel === 'function');
|
|
6499
|
+
done();
|
|
6500
|
+
} catch (error) {
|
|
6501
|
+
log.error(`Test Failure: ${error}`);
|
|
6502
|
+
done(error);
|
|
6503
|
+
}
|
|
6504
|
+
}).timeout(attemptTimeout);
|
|
6505
|
+
});
|
|
6506
|
+
|
|
6507
|
+
describe('#getChangeModelById - errors', () => {
|
|
6508
|
+
it('should have a getChangeModelById function', (done) => {
|
|
6509
|
+
try {
|
|
6510
|
+
assert.equal(true, typeof a.getChangeModelById === 'function');
|
|
6511
|
+
done();
|
|
6512
|
+
} catch (error) {
|
|
6513
|
+
log.error(`Test Failure: ${error}`);
|
|
6514
|
+
done(error);
|
|
6515
|
+
}
|
|
6516
|
+
}).timeout(attemptTimeout);
|
|
6517
|
+
it('should error if - missing sysId', (done) => {
|
|
6518
|
+
try {
|
|
6519
|
+
a.getChangeModelById(null, null, (data, error) => {
|
|
6520
|
+
try {
|
|
6521
|
+
const displayE = 'sysId is required';
|
|
6522
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-getChangeModelById', displayE);
|
|
6523
|
+
done();
|
|
6524
|
+
} catch (err) {
|
|
6525
|
+
log.error(`Test Failure: ${err}`);
|
|
6526
|
+
done(err);
|
|
6527
|
+
}
|
|
6528
|
+
});
|
|
6529
|
+
} catch (error) {
|
|
6530
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6531
|
+
done(error);
|
|
6532
|
+
}
|
|
6533
|
+
}).timeout(attemptTimeout);
|
|
6534
|
+
});
|
|
6535
|
+
|
|
6536
|
+
describe('#getChangeWorkerById - errors', () => {
|
|
6537
|
+
it('should have a getChangeWorkerById function', (done) => {
|
|
6538
|
+
try {
|
|
6539
|
+
assert.equal(true, typeof a.getChangeWorkerById === 'function');
|
|
6540
|
+
done();
|
|
6541
|
+
} catch (error) {
|
|
6542
|
+
log.error(`Test Failure: ${error}`);
|
|
6543
|
+
done(error);
|
|
6544
|
+
}
|
|
6545
|
+
}).timeout(attemptTimeout);
|
|
6546
|
+
it('should error if - missing sysId', (done) => {
|
|
6547
|
+
try {
|
|
6548
|
+
a.getChangeWorkerById(null, null, (data, error) => {
|
|
6549
|
+
try {
|
|
6550
|
+
const displayE = 'sysId is required';
|
|
6551
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-getChangeWorkerById', displayE);
|
|
6552
|
+
done();
|
|
6553
|
+
} catch (err) {
|
|
6554
|
+
log.error(`Test Failure: ${err}`);
|
|
6555
|
+
done(err);
|
|
6556
|
+
}
|
|
6557
|
+
});
|
|
6558
|
+
} catch (error) {
|
|
6559
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6560
|
+
done(error);
|
|
6561
|
+
}
|
|
6562
|
+
}).timeout(attemptTimeout);
|
|
6563
|
+
});
|
|
6564
|
+
|
|
6565
|
+
describe('#updateChangeRequestById - errors', () => {
|
|
6566
|
+
it('should have a updateChangeRequestById function', (done) => {
|
|
6567
|
+
try {
|
|
6568
|
+
assert.equal(true, typeof a.updateChangeRequestById === 'function');
|
|
6569
|
+
done();
|
|
6570
|
+
} catch (error) {
|
|
6571
|
+
log.error(`Test Failure: ${error}`);
|
|
6572
|
+
done(error);
|
|
6573
|
+
}
|
|
6574
|
+
}).timeout(attemptTimeout);
|
|
6575
|
+
it('should error if - missing sysId', (done) => {
|
|
6576
|
+
try {
|
|
6577
|
+
a.updateChangeRequestById(null, null, null, null, null, null, (data, error) => {
|
|
6578
|
+
try {
|
|
6579
|
+
const displayE = 'sysId is required';
|
|
6580
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-updateChangeRequestById', displayE);
|
|
6581
|
+
done();
|
|
6582
|
+
} catch (err) {
|
|
6583
|
+
log.error(`Test Failure: ${err}`);
|
|
6584
|
+
done(err);
|
|
6585
|
+
}
|
|
6586
|
+
});
|
|
6587
|
+
} catch (error) {
|
|
6588
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6589
|
+
done(error);
|
|
6590
|
+
}
|
|
6591
|
+
}).timeout(attemptTimeout);
|
|
6592
|
+
it('should error if - missing body', (done) => {
|
|
6593
|
+
try {
|
|
6594
|
+
a.updateChangeRequestById('fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', null, null, (data, error) => {
|
|
6595
|
+
try {
|
|
6596
|
+
const displayE = 'body is required';
|
|
6597
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-updateChangeRequestById', displayE);
|
|
6598
|
+
done();
|
|
6599
|
+
} catch (err) {
|
|
6600
|
+
log.error(`Test Failure: ${err}`);
|
|
6601
|
+
done(err);
|
|
6602
|
+
}
|
|
6603
|
+
});
|
|
6604
|
+
} catch (error) {
|
|
6605
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6606
|
+
done(error);
|
|
6607
|
+
}
|
|
6608
|
+
}).timeout(attemptTimeout);
|
|
6609
|
+
});
|
|
6610
|
+
|
|
6611
|
+
describe('#deleteChangeRequestById - errors', () => {
|
|
6612
|
+
it('should have a deleteChangeRequestById function', (done) => {
|
|
6613
|
+
try {
|
|
6614
|
+
assert.equal(true, typeof a.deleteChangeRequestById === 'function');
|
|
6615
|
+
done();
|
|
6616
|
+
} catch (error) {
|
|
6617
|
+
log.error(`Test Failure: ${error}`);
|
|
6618
|
+
done(error);
|
|
6619
|
+
}
|
|
6620
|
+
}).timeout(attemptTimeout);
|
|
6621
|
+
it('should error if - missing sysId', (done) => {
|
|
6622
|
+
try {
|
|
6623
|
+
a.deleteChangeRequestById(null, null, (data, error) => {
|
|
6624
|
+
try {
|
|
6625
|
+
const displayE = 'sysId is required';
|
|
6626
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-deleteChangeRequestById', displayE);
|
|
6627
|
+
done();
|
|
6628
|
+
} catch (err) {
|
|
6629
|
+
log.error(`Test Failure: ${err}`);
|
|
6630
|
+
done(err);
|
|
6631
|
+
}
|
|
6632
|
+
});
|
|
6633
|
+
} catch (error) {
|
|
6634
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6635
|
+
done(error);
|
|
6636
|
+
}
|
|
6637
|
+
}).timeout(attemptTimeout);
|
|
6638
|
+
});
|
|
6639
|
+
|
|
6640
|
+
describe('#getChangeRequestRecordById - errors', () => {
|
|
6641
|
+
it('should have a getChangeRequestRecordById function', (done) => {
|
|
6642
|
+
try {
|
|
6643
|
+
assert.equal(true, typeof a.getChangeRequestRecordById === 'function');
|
|
6644
|
+
done();
|
|
6645
|
+
} catch (error) {
|
|
6646
|
+
log.error(`Test Failure: ${error}`);
|
|
6647
|
+
done(error);
|
|
6648
|
+
}
|
|
6649
|
+
}).timeout(attemptTimeout);
|
|
6650
|
+
it('should error if - missing sysId', (done) => {
|
|
6651
|
+
try {
|
|
6652
|
+
a.getChangeRequestRecordById(null, null, (data, error) => {
|
|
6653
|
+
try {
|
|
6654
|
+
const displayE = 'sysId is required';
|
|
6655
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-getChangeRequestRecordById', displayE);
|
|
6656
|
+
done();
|
|
6657
|
+
} catch (err) {
|
|
6658
|
+
log.error(`Test Failure: ${err}`);
|
|
6659
|
+
done(err);
|
|
6660
|
+
}
|
|
6661
|
+
});
|
|
6662
|
+
} catch (error) {
|
|
6663
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6664
|
+
done(error);
|
|
6665
|
+
}
|
|
6666
|
+
}).timeout(attemptTimeout);
|
|
6667
|
+
});
|
|
6668
|
+
|
|
6669
|
+
describe('#addChangeRequestConfigurationItem - errors', () => {
|
|
6670
|
+
it('should have a addChangeRequestConfigurationItem function', (done) => {
|
|
6671
|
+
try {
|
|
6672
|
+
assert.equal(true, typeof a.addChangeRequestConfigurationItem === 'function');
|
|
6673
|
+
done();
|
|
6674
|
+
} catch (error) {
|
|
6675
|
+
log.error(`Test Failure: ${error}`);
|
|
6676
|
+
done(error);
|
|
6677
|
+
}
|
|
6678
|
+
}).timeout(attemptTimeout);
|
|
6679
|
+
it('should error if - missing changeSysId', (done) => {
|
|
6680
|
+
try {
|
|
6681
|
+
a.addChangeRequestConfigurationItem(null, null, null, (data, error) => {
|
|
6682
|
+
try {
|
|
6683
|
+
const displayE = 'changeSysId is required';
|
|
6684
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-addChangeRequestConfigurationItem', displayE);
|
|
6685
|
+
done();
|
|
6686
|
+
} catch (err) {
|
|
6687
|
+
log.error(`Test Failure: ${err}`);
|
|
6688
|
+
done(err);
|
|
6689
|
+
}
|
|
6690
|
+
});
|
|
6691
|
+
} catch (error) {
|
|
6692
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6693
|
+
done(error);
|
|
6694
|
+
}
|
|
6695
|
+
}).timeout(attemptTimeout);
|
|
6696
|
+
it('should error if - missing body', (done) => {
|
|
6697
|
+
try {
|
|
6698
|
+
a.addChangeRequestConfigurationItem('fakeparam', null, null, (data, error) => {
|
|
6699
|
+
try {
|
|
6700
|
+
const displayE = 'body is required';
|
|
6701
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-addChangeRequestConfigurationItem', displayE);
|
|
6702
|
+
done();
|
|
6703
|
+
} catch (err) {
|
|
6704
|
+
log.error(`Test Failure: ${err}`);
|
|
6705
|
+
done(err);
|
|
6706
|
+
}
|
|
6707
|
+
});
|
|
6708
|
+
} catch (error) {
|
|
6709
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6710
|
+
done(error);
|
|
6711
|
+
}
|
|
6712
|
+
}).timeout(attemptTimeout);
|
|
6713
|
+
});
|
|
6714
|
+
|
|
6715
|
+
describe('#getChangeRequestConfigurationItems - errors', () => {
|
|
6716
|
+
it('should have a getChangeRequestConfigurationItems function', (done) => {
|
|
6717
|
+
try {
|
|
6718
|
+
assert.equal(true, typeof a.getChangeRequestConfigurationItems === 'function');
|
|
6719
|
+
done();
|
|
6720
|
+
} catch (error) {
|
|
6721
|
+
log.error(`Test Failure: ${error}`);
|
|
6722
|
+
done(error);
|
|
6723
|
+
}
|
|
6724
|
+
}).timeout(attemptTimeout);
|
|
6725
|
+
it('should error if - missing changeSysId', (done) => {
|
|
6726
|
+
try {
|
|
6727
|
+
a.getChangeRequestConfigurationItems(null, null, null, null, null, null, null, (data, error) => {
|
|
6728
|
+
try {
|
|
6729
|
+
const displayE = 'changeSysId is required';
|
|
6730
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-getChangeRequestConfigurationItems', displayE);
|
|
6731
|
+
done();
|
|
6732
|
+
} catch (err) {
|
|
6733
|
+
log.error(`Test Failure: ${err}`);
|
|
6734
|
+
done(err);
|
|
6735
|
+
}
|
|
6736
|
+
});
|
|
6737
|
+
} catch (error) {
|
|
6738
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6739
|
+
done(error);
|
|
6740
|
+
}
|
|
6741
|
+
}).timeout(attemptTimeout);
|
|
6742
|
+
});
|
|
6743
|
+
|
|
6744
|
+
describe('#getChangeRequestNextStates - errors', () => {
|
|
6745
|
+
it('should have a getChangeRequestNextStates function', (done) => {
|
|
6746
|
+
try {
|
|
6747
|
+
assert.equal(true, typeof a.getChangeRequestNextStates === 'function');
|
|
6748
|
+
done();
|
|
6749
|
+
} catch (error) {
|
|
6750
|
+
log.error(`Test Failure: ${error}`);
|
|
6751
|
+
done(error);
|
|
6752
|
+
}
|
|
6753
|
+
}).timeout(attemptTimeout);
|
|
6754
|
+
it('should error if - missing changeSysId', (done) => {
|
|
6755
|
+
try {
|
|
6756
|
+
a.getChangeRequestNextStates(null, null, (data, error) => {
|
|
6757
|
+
try {
|
|
6758
|
+
const displayE = 'changeSysId is required';
|
|
6759
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-getChangeRequestNextStates', displayE);
|
|
6760
|
+
done();
|
|
6761
|
+
} catch (err) {
|
|
6762
|
+
log.error(`Test Failure: ${err}`);
|
|
6763
|
+
done(err);
|
|
6764
|
+
}
|
|
6765
|
+
});
|
|
6766
|
+
} catch (error) {
|
|
6767
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6768
|
+
done(error);
|
|
6769
|
+
}
|
|
6770
|
+
}).timeout(attemptTimeout);
|
|
6771
|
+
});
|
|
6772
|
+
|
|
6773
|
+
describe('#refreshChangeRequestImpactedServices - errors', () => {
|
|
6774
|
+
it('should have a refreshChangeRequestImpactedServices function', (done) => {
|
|
6775
|
+
try {
|
|
6776
|
+
assert.equal(true, typeof a.refreshChangeRequestImpactedServices === 'function');
|
|
6777
|
+
done();
|
|
6778
|
+
} catch (error) {
|
|
6779
|
+
log.error(`Test Failure: ${error}`);
|
|
6780
|
+
done(error);
|
|
6781
|
+
}
|
|
6782
|
+
}).timeout(attemptTimeout);
|
|
6783
|
+
it('should error if - missing changeSysId', (done) => {
|
|
6784
|
+
try {
|
|
6785
|
+
a.refreshChangeRequestImpactedServices(null, null, null, (data, error) => {
|
|
6786
|
+
try {
|
|
6787
|
+
const displayE = 'changeSysId is required';
|
|
6788
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-refreshChangeRequestImpactedServices', displayE);
|
|
6789
|
+
done();
|
|
6790
|
+
} catch (err) {
|
|
6791
|
+
log.error(`Test Failure: ${err}`);
|
|
6792
|
+
done(err);
|
|
6793
|
+
}
|
|
6794
|
+
});
|
|
6795
|
+
} catch (error) {
|
|
6796
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6797
|
+
done(error);
|
|
6798
|
+
}
|
|
6799
|
+
}).timeout(attemptTimeout);
|
|
6800
|
+
it('should error if - missing body', (done) => {
|
|
6801
|
+
try {
|
|
6802
|
+
a.refreshChangeRequestImpactedServices('fakeparam', null, null, (data, error) => {
|
|
6803
|
+
try {
|
|
6804
|
+
const displayE = 'body is required';
|
|
6805
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-refreshChangeRequestImpactedServices', displayE);
|
|
6806
|
+
done();
|
|
6807
|
+
} catch (err) {
|
|
6808
|
+
log.error(`Test Failure: ${err}`);
|
|
6809
|
+
done(err);
|
|
6810
|
+
}
|
|
6811
|
+
});
|
|
6812
|
+
} catch (error) {
|
|
6813
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6814
|
+
done(error);
|
|
6815
|
+
}
|
|
6816
|
+
}).timeout(attemptTimeout);
|
|
6817
|
+
});
|
|
6818
|
+
|
|
6819
|
+
describe('#getChangeRequestSchedule - errors', () => {
|
|
6820
|
+
it('should have a getChangeRequestSchedule function', (done) => {
|
|
6821
|
+
try {
|
|
6822
|
+
assert.equal(true, typeof a.getChangeRequestSchedule === 'function');
|
|
6823
|
+
done();
|
|
6824
|
+
} catch (error) {
|
|
6825
|
+
log.error(`Test Failure: ${error}`);
|
|
6826
|
+
done(error);
|
|
6827
|
+
}
|
|
6828
|
+
}).timeout(attemptTimeout);
|
|
6829
|
+
it('should error if - missing changeSysId', (done) => {
|
|
6830
|
+
try {
|
|
6831
|
+
a.getChangeRequestSchedule(null, null, (data, error) => {
|
|
6832
|
+
try {
|
|
6833
|
+
const displayE = 'changeSysId is required';
|
|
6834
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-getChangeRequestSchedule', displayE);
|
|
6835
|
+
done();
|
|
6836
|
+
} catch (err) {
|
|
6837
|
+
log.error(`Test Failure: ${err}`);
|
|
6838
|
+
done(err);
|
|
6839
|
+
}
|
|
6840
|
+
});
|
|
6841
|
+
} catch (error) {
|
|
6842
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6843
|
+
done(error);
|
|
6844
|
+
}
|
|
6845
|
+
}).timeout(attemptTimeout);
|
|
6846
|
+
});
|
|
6847
|
+
|
|
6848
|
+
describe('#updateChangeRequestFirstAvailableSchedule - errors', () => {
|
|
6849
|
+
it('should have a updateChangeRequestFirstAvailableSchedule function', (done) => {
|
|
6850
|
+
try {
|
|
6851
|
+
assert.equal(true, typeof a.updateChangeRequestFirstAvailableSchedule === 'function');
|
|
6852
|
+
done();
|
|
6853
|
+
} catch (error) {
|
|
6854
|
+
log.error(`Test Failure: ${error}`);
|
|
6855
|
+
done(error);
|
|
6856
|
+
}
|
|
6857
|
+
}).timeout(attemptTimeout);
|
|
6858
|
+
it('should error if - missing changeSysId', (done) => {
|
|
6859
|
+
try {
|
|
6860
|
+
a.updateChangeRequestFirstAvailableSchedule(null, null, null, (data, error) => {
|
|
6861
|
+
try {
|
|
6862
|
+
const displayE = 'changeSysId is required';
|
|
6863
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-updateChangeRequestFirstAvailableSchedule', displayE);
|
|
6864
|
+
done();
|
|
6865
|
+
} catch (err) {
|
|
6866
|
+
log.error(`Test Failure: ${err}`);
|
|
6867
|
+
done(err);
|
|
6868
|
+
}
|
|
6869
|
+
});
|
|
6870
|
+
} catch (error) {
|
|
6871
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6872
|
+
done(error);
|
|
6873
|
+
}
|
|
6874
|
+
}).timeout(attemptTimeout);
|
|
6875
|
+
it('should error if - missing body', (done) => {
|
|
6876
|
+
try {
|
|
6877
|
+
a.updateChangeRequestFirstAvailableSchedule('fakeparam', null, null, (data, error) => {
|
|
6878
|
+
try {
|
|
6879
|
+
const displayE = 'body is required';
|
|
6880
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-updateChangeRequestFirstAvailableSchedule', displayE);
|
|
6881
|
+
done();
|
|
6882
|
+
} catch (err) {
|
|
6883
|
+
log.error(`Test Failure: ${err}`);
|
|
6884
|
+
done(err);
|
|
6885
|
+
}
|
|
6886
|
+
});
|
|
6887
|
+
} catch (error) {
|
|
6888
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6889
|
+
done(error);
|
|
6890
|
+
}
|
|
6891
|
+
}).timeout(attemptTimeout);
|
|
6892
|
+
});
|
|
6893
|
+
|
|
6894
|
+
describe('#updateChangeTaskByTaskId - errors', () => {
|
|
6895
|
+
it('should have a updateChangeTaskByTaskId function', (done) => {
|
|
6896
|
+
try {
|
|
6897
|
+
assert.equal(true, typeof a.updateChangeTaskByTaskId === 'function');
|
|
6898
|
+
done();
|
|
6899
|
+
} catch (error) {
|
|
6900
|
+
log.error(`Test Failure: ${error}`);
|
|
6901
|
+
done(error);
|
|
6902
|
+
}
|
|
6903
|
+
}).timeout(attemptTimeout);
|
|
6904
|
+
it('should error if - missing changeSysId', (done) => {
|
|
6905
|
+
try {
|
|
6906
|
+
a.updateChangeTaskByTaskId(null, null, null, null, null, null, (data, error) => {
|
|
6907
|
+
try {
|
|
6908
|
+
const displayE = 'changeSysId is required';
|
|
6909
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-updateChangeTaskByTaskId', displayE);
|
|
6910
|
+
done();
|
|
6911
|
+
} catch (err) {
|
|
6912
|
+
log.error(`Test Failure: ${err}`);
|
|
6913
|
+
done(err);
|
|
6914
|
+
}
|
|
6915
|
+
});
|
|
6916
|
+
} catch (error) {
|
|
6917
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6918
|
+
done(error);
|
|
6919
|
+
}
|
|
6920
|
+
}).timeout(attemptTimeout);
|
|
6921
|
+
it('should error if - missing taskSysId', (done) => {
|
|
6922
|
+
try {
|
|
6923
|
+
a.updateChangeTaskByTaskId('fakeparam', null, null, null, null, null, (data, error) => {
|
|
6924
|
+
try {
|
|
6925
|
+
const displayE = 'taskSysId is required';
|
|
6926
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-updateChangeTaskByTaskId', displayE);
|
|
6927
|
+
done();
|
|
6928
|
+
} catch (err) {
|
|
6929
|
+
log.error(`Test Failure: ${err}`);
|
|
6930
|
+
done(err);
|
|
6931
|
+
}
|
|
6932
|
+
});
|
|
6933
|
+
} catch (error) {
|
|
6934
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6935
|
+
done(error);
|
|
6936
|
+
}
|
|
6937
|
+
}).timeout(attemptTimeout);
|
|
6938
|
+
it('should error if - missing body', (done) => {
|
|
6939
|
+
try {
|
|
6940
|
+
a.updateChangeTaskByTaskId('fakeparam', 'fakeparam', 'fakeparam', 'fakeparam', null, null, (data, error) => {
|
|
6941
|
+
try {
|
|
6942
|
+
const displayE = 'body is required';
|
|
6943
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-updateChangeTaskByTaskId', displayE);
|
|
6944
|
+
done();
|
|
6945
|
+
} catch (err) {
|
|
6946
|
+
log.error(`Test Failure: ${err}`);
|
|
6947
|
+
done(err);
|
|
6948
|
+
}
|
|
6949
|
+
});
|
|
6950
|
+
} catch (error) {
|
|
6951
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6952
|
+
done(error);
|
|
6953
|
+
}
|
|
6954
|
+
}).timeout(attemptTimeout);
|
|
6955
|
+
});
|
|
6956
|
+
|
|
6957
|
+
describe('#updateChangeRequestRisk - errors', () => {
|
|
6958
|
+
it('should have a updateChangeRequestRisk function', (done) => {
|
|
6959
|
+
try {
|
|
6960
|
+
assert.equal(true, typeof a.updateChangeRequestRisk === 'function');
|
|
6961
|
+
done();
|
|
6962
|
+
} catch (error) {
|
|
6963
|
+
log.error(`Test Failure: ${error}`);
|
|
6964
|
+
done(error);
|
|
6965
|
+
}
|
|
6966
|
+
}).timeout(attemptTimeout);
|
|
6967
|
+
it('should error if - missing sysId', (done) => {
|
|
6968
|
+
try {
|
|
6969
|
+
a.updateChangeRequestRisk(null, null, null, (data, error) => {
|
|
6970
|
+
try {
|
|
6971
|
+
const displayE = 'sysId is required';
|
|
6972
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-updateChangeRequestRisk', displayE);
|
|
6973
|
+
done();
|
|
6974
|
+
} catch (err) {
|
|
6975
|
+
log.error(`Test Failure: ${err}`);
|
|
6976
|
+
done(err);
|
|
6977
|
+
}
|
|
6978
|
+
});
|
|
6979
|
+
} catch (error) {
|
|
6980
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6981
|
+
done(error);
|
|
6982
|
+
}
|
|
6983
|
+
}).timeout(attemptTimeout);
|
|
6984
|
+
it('should error if - missing body', (done) => {
|
|
6985
|
+
try {
|
|
6986
|
+
a.updateChangeRequestRisk('fakeparam', null, null, (data, error) => {
|
|
6987
|
+
try {
|
|
6988
|
+
const displayE = 'body is required';
|
|
6989
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-updateChangeRequestRisk', displayE);
|
|
6990
|
+
done();
|
|
6991
|
+
} catch (err) {
|
|
6992
|
+
log.error(`Test Failure: ${err}`);
|
|
6993
|
+
done(err);
|
|
6994
|
+
}
|
|
6995
|
+
});
|
|
6996
|
+
} catch (error) {
|
|
6997
|
+
log.error(`Adapter Exception: ${error}`);
|
|
6998
|
+
done(error);
|
|
6999
|
+
}
|
|
7000
|
+
}).timeout(attemptTimeout);
|
|
7001
|
+
});
|
|
7002
|
+
|
|
7003
|
+
describe('#updateStandardChangeRequestById - errors', () => {
|
|
7004
|
+
it('should have a updateStandardChangeRequestById function', (done) => {
|
|
7005
|
+
try {
|
|
7006
|
+
assert.equal(true, typeof a.updateStandardChangeRequestById === 'function');
|
|
7007
|
+
done();
|
|
7008
|
+
} catch (error) {
|
|
7009
|
+
log.error(`Test Failure: ${error}`);
|
|
7010
|
+
done(error);
|
|
7011
|
+
}
|
|
7012
|
+
}).timeout(attemptTimeout);
|
|
7013
|
+
it('should error if - missing sysId', (done) => {
|
|
7014
|
+
try {
|
|
7015
|
+
a.updateStandardChangeRequestById(null, null, null, null, null, (data, error) => {
|
|
7016
|
+
try {
|
|
7017
|
+
const displayE = 'sysId is required';
|
|
7018
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-updateStandardChangeRequestById', displayE);
|
|
7019
|
+
done();
|
|
7020
|
+
} catch (err) {
|
|
7021
|
+
log.error(`Test Failure: ${err}`);
|
|
7022
|
+
done(err);
|
|
7023
|
+
}
|
|
7024
|
+
});
|
|
7025
|
+
} catch (error) {
|
|
7026
|
+
log.error(`Adapter Exception: ${error}`);
|
|
7027
|
+
done(error);
|
|
7028
|
+
}
|
|
7029
|
+
}).timeout(attemptTimeout);
|
|
7030
|
+
it('should error if - missing body', (done) => {
|
|
7031
|
+
try {
|
|
7032
|
+
a.updateStandardChangeRequestById('fakeparam', 'fakeparam', 'fakeparam', null, null, (data, error) => {
|
|
7033
|
+
try {
|
|
7034
|
+
const displayE = 'body is required';
|
|
7035
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-servicenow-adapter-updateStandardChangeRequestById', displayE);
|
|
7036
|
+
done();
|
|
7037
|
+
} catch (err) {
|
|
7038
|
+
log.error(`Test Failure: ${err}`);
|
|
7039
|
+
done(err);
|
|
7040
|
+
}
|
|
7041
|
+
});
|
|
7042
|
+
} catch (error) {
|
|
7043
|
+
log.error(`Adapter Exception: ${error}`);
|
|
7044
|
+
done(error);
|
|
7045
|
+
}
|
|
7046
|
+
}).timeout(attemptTimeout);
|
|
7047
|
+
});
|
|
6378
7048
|
});
|
|
6379
7049
|
});
|
|
Binary file
|