@itentialopensource/adapter-paragon_insights 0.1.1 → 0.1.3

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.
@@ -122,7 +122,8 @@
122
122
  "static_token",
123
123
  "jwt_token",
124
124
  "request_token",
125
- "no_authentication"
125
+ "no_authentication",
126
+ "multi_step_authentication"
126
127
  ]
127
128
  },
128
129
  "username": {
Binary file
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "0.1.0",
3
- "configLines": 22633,
2
+ "version": "0.1.2",
3
+ "configLines": 23439,
4
4
  "scriptLines": 1795,
5
- "codeLines": 48111,
6
- "testLines": 28055,
7
- "testCases": 1497,
8
- "totalCodeLines": 77961,
9
- "wfTasks": 476
5
+ "codeLines": 50091,
6
+ "testLines": 29130,
7
+ "testCases": 1556,
8
+ "totalCodeLines": 81016,
9
+ "wfTasks": 496
10
10
  }
@@ -13,15 +13,49 @@
13
13
  "stub": false,
14
14
  "protocol": "https",
15
15
  "authentication": {
16
- "auth_method": "request_token",
17
- "username": "username",
18
- "password": "password",
16
+ "auth_method": "multi_step_authentication",
17
+ "multiStepAuthCalls": [
18
+ {
19
+ "name": "getFirstToken",
20
+ "requestFields": {
21
+ "user": {
22
+ "domain": "",
23
+ "name": ""
24
+ },
25
+ "password": "",
26
+ "methods": [
27
+ "PASSWORD"
28
+ ]
29
+ },
30
+ "responseFields": {
31
+ "firstIdToken": "id_token",
32
+ "scopeId": "scopes.0.id"
33
+ },
34
+ "successfullResponseCode": 200
35
+ },
36
+ {
37
+ "name": "getSecondToken",
38
+ "requestFields": {
39
+ "token": "{getFirstToken.responseFields.firstIdToken}",
40
+ "scopeId": "{getFirstToken.responseFields.scopeId}",
41
+ "methods": [
42
+ "TOKEN"
43
+ ]
44
+ },
45
+ "responseFields": {
46
+ "tokenp2": "id_token"
47
+ },
48
+ "successfullResponseCode": 200
49
+ }
50
+ ],
51
+ "username": "admin",
52
+ "password": "pass",
19
53
  "token": "token",
20
54
  "token_timeout": 1800000,
21
55
  "token_cache": "local",
22
56
  "invalid_token_error": 401,
23
57
  "auth_field": "header.headers.x-iam-token",
24
- "auth_field_format": "{token}",
58
+ "auth_field_format": "{tokenp2}",
25
59
  "auth_logging": false,
26
60
  "client_id": "",
27
61
  "client_secret": "",
@@ -12265,5 +12265,515 @@ describe('[integration] Paragon_insights Adapter Test', () => {
12265
12265
  }
12266
12266
  }).timeout(attemptTimeout);
12267
12267
  });
12268
+
12269
+ describe('#retrieveDeviceTriggerInfo - errors', () => {
12270
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
12271
+ try {
12272
+ a.retrieveDeviceTriggerInfo('fakedata', (data, error) => {
12273
+ try {
12274
+ if (stub) {
12275
+ const displayE = 'Error 400 received on request';
12276
+ runErrorAsserts(data, error, 'AD.500', 'Test-paragon_insights-connectorRest-handleEndResponse', displayE);
12277
+ } else {
12278
+ runCommonAsserts(data, error);
12279
+ }
12280
+ saveMockData('Configuration', 'retrieveDeviceTriggerInfo', 'default', data);
12281
+ done();
12282
+ } catch (err) {
12283
+ log.error(`Test Failure: ${err}`);
12284
+ done(err);
12285
+ }
12286
+ });
12287
+ } catch (error) {
12288
+ log.error(`Adapter Exception: ${error}`);
12289
+ done(error);
12290
+ }
12291
+ }).timeout(attemptTimeout);
12292
+ });
12293
+
12294
+ describe('#removeIcebergDevicesFromGroup - errors', () => {
12295
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
12296
+ try {
12297
+ a.removeIcebergDevicesFromGroup('fakedata', (data, error) => {
12298
+ try {
12299
+ if (stub) {
12300
+ const displayE = 'Error 400 received on request';
12301
+ runErrorAsserts(data, error, 'AD.500', 'Test-paragon_insights-connectorRest-handleEndResponse', displayE);
12302
+ } else {
12303
+ runCommonAsserts(data, error);
12304
+ }
12305
+ saveMockData('Configuration', 'removeIcebergDevicesFromGroup', 'default', data);
12306
+ done();
12307
+ } catch (err) {
12308
+ log.error(`Test Failure: ${err}`);
12309
+ done(err);
12310
+ }
12311
+ });
12312
+ } catch (error) {
12313
+ log.error(`Adapter Exception: ${error}`);
12314
+ done(error);
12315
+ }
12316
+ }).timeout(attemptTimeout);
12317
+ });
12318
+
12319
+ describe('#removeIcebergNetworkGroupNetworkGroupById - errors', () => {
12320
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
12321
+ try {
12322
+ a.removeIcebergNetworkGroupNetworkGroupById('fakedata', (data, error) => {
12323
+ try {
12324
+ if (stub) {
12325
+ const displayE = 'Error 400 received on request';
12326
+ runErrorAsserts(data, error, 'AD.500', 'Test-paragon_insights-connectorRest-handleEndResponse', displayE);
12327
+ } else {
12328
+ runCommonAsserts(data, error);
12329
+ }
12330
+ saveMockData('Configuration', 'removeIcebergNetworkGroupNetworkGroupById', 'default', data);
12331
+ done();
12332
+ } catch (err) {
12333
+ log.error(`Test Failure: ${err}`);
12334
+ done(err);
12335
+ }
12336
+ });
12337
+ } catch (error) {
12338
+ log.error(`Adapter Exception: ${error}`);
12339
+ done(error);
12340
+ }
12341
+ }).timeout(attemptTimeout);
12342
+ });
12343
+
12344
+ describe('#retrieveHealthbotIngestSettingsPaa - errors', () => {
12345
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
12346
+ try {
12347
+ a.retrieveHealthbotIngestSettingsPaa(null, (data, error) => {
12348
+ try {
12349
+ if (stub) {
12350
+ const displayE = 'Error 400 received on request';
12351
+ runErrorAsserts(data, error, 'AD.500', 'Test-paragon_insights-connectorRest-handleEndResponse', displayE);
12352
+ } else {
12353
+ runCommonAsserts(data, error);
12354
+ }
12355
+ saveMockData('Config', 'retrieveHealthbotIngestSettingsPaa', 'default', data);
12356
+ done();
12357
+ } catch (err) {
12358
+ log.error(`Test Failure: ${err}`);
12359
+ done(err);
12360
+ }
12361
+ });
12362
+ } catch (error) {
12363
+ log.error(`Adapter Exception: ${error}`);
12364
+ done(error);
12365
+ }
12366
+ }).timeout(attemptTimeout);
12367
+ });
12368
+
12369
+ describe('#deleteHealthbotIngestPaaByPaaName - errors', () => {
12370
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
12371
+ try {
12372
+ a.deleteHealthbotIngestPaaByPaaName('fakedata', (data, error) => {
12373
+ try {
12374
+ if (stub) {
12375
+ const displayE = 'Error 400 received on request';
12376
+ runErrorAsserts(data, error, 'AD.500', 'Test-paragon_insights-connectorRest-handleEndResponse', displayE);
12377
+ } else {
12378
+ runCommonAsserts(data, error);
12379
+ }
12380
+ saveMockData('Config', 'deleteHealthbotIngestPaaByPaaName', 'default', data);
12381
+ done();
12382
+ } catch (err) {
12383
+ log.error(`Test Failure: ${err}`);
12384
+ done(err);
12385
+ }
12386
+ });
12387
+ } catch (error) {
12388
+ log.error(`Adapter Exception: ${error}`);
12389
+ done(error);
12390
+ }
12391
+ }).timeout(attemptTimeout);
12392
+ });
12393
+
12394
+ describe('#retrieveHealthbotIngestPaaByPaaName - errors', () => {
12395
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
12396
+ try {
12397
+ a.retrieveHealthbotIngestPaaByPaaName('fakedata', null, (data, error) => {
12398
+ try {
12399
+ if (stub) {
12400
+ const displayE = 'Error 400 received on request';
12401
+ runErrorAsserts(data, error, 'AD.500', 'Test-paragon_insights-connectorRest-handleEndResponse', displayE);
12402
+ } else {
12403
+ runCommonAsserts(data, error);
12404
+ }
12405
+ saveMockData('Config', 'retrieveHealthbotIngestPaaByPaaName', 'default', data);
12406
+ done();
12407
+ } catch (err) {
12408
+ log.error(`Test Failure: ${err}`);
12409
+ done(err);
12410
+ }
12411
+ });
12412
+ } catch (error) {
12413
+ log.error(`Adapter Exception: ${error}`);
12414
+ done(error);
12415
+ }
12416
+ }).timeout(attemptTimeout);
12417
+ });
12418
+
12419
+ const configUpdateIngestPaaByPaaNameBodyParam = {};
12420
+ describe('#updateIngestPaaByPaaName - errors', () => {
12421
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
12422
+ try {
12423
+ a.updateIngestPaaByPaaName('fakedata', configUpdateIngestPaaByPaaNameBodyParam, (data, error) => {
12424
+ try {
12425
+ if (stub) {
12426
+ const displayE = 'Error 400 received on request';
12427
+ runErrorAsserts(data, error, 'AD.500', 'Test-paragon_insights-connectorRest-handleEndResponse', displayE);
12428
+ } else {
12429
+ runCommonAsserts(data, error);
12430
+ }
12431
+ saveMockData('Config', 'updateIngestPaaByPaaName', 'default', data);
12432
+ done();
12433
+ } catch (err) {
12434
+ log.error(`Test Failure: ${err}`);
12435
+ done(err);
12436
+ }
12437
+ });
12438
+ } catch (error) {
12439
+ log.error(`Adapter Exception: ${error}`);
12440
+ done(error);
12441
+ }
12442
+ }).timeout(attemptTimeout);
12443
+ });
12444
+
12445
+ const configCreateIngestPaaByPaaNameBodyParam = {};
12446
+ describe('#createIngestPaaByPaaName - errors', () => {
12447
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
12448
+ try {
12449
+ a.createIngestPaaByPaaName('fakedata', configCreateIngestPaaByPaaNameBodyParam, (data, error) => {
12450
+ try {
12451
+ if (stub) {
12452
+ const displayE = 'Error 400 received on request';
12453
+ runErrorAsserts(data, error, 'AD.500', 'Test-paragon_insights-connectorRest-handleEndResponse', displayE);
12454
+ } else {
12455
+ runCommonAsserts(data, error);
12456
+ }
12457
+ saveMockData('Config', 'createIngestPaaByPaaName', 'default', data);
12458
+ done();
12459
+ } catch (err) {
12460
+ log.error(`Test Failure: ${err}`);
12461
+ done(err);
12462
+ }
12463
+ });
12464
+ } catch (error) {
12465
+ log.error(`Adapter Exception: ${error}`);
12466
+ done(error);
12467
+ }
12468
+ }).timeout(attemptTimeout);
12469
+ });
12470
+
12471
+ describe('#deleteHealthbotIngestIfa - errors', () => {
12472
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
12473
+ try {
12474
+ a.deleteHealthbotIngestIfa((data, error) => {
12475
+ try {
12476
+ if (stub) {
12477
+ const displayE = 'Error 400 received on request';
12478
+ runErrorAsserts(data, error, 'AD.500', 'Test-paragon_insights-connectorRest-handleEndResponse', displayE);
12479
+ } else {
12480
+ runCommonAsserts(data, error);
12481
+ }
12482
+ saveMockData('Config', 'deleteHealthbotIngestIfa', 'default', data);
12483
+ done();
12484
+ } catch (err) {
12485
+ log.error(`Test Failure: ${err}`);
12486
+ done(err);
12487
+ }
12488
+ });
12489
+ } catch (error) {
12490
+ log.error(`Adapter Exception: ${error}`);
12491
+ done(error);
12492
+ }
12493
+ }).timeout(attemptTimeout);
12494
+ });
12495
+
12496
+ describe('#retrieveHealthbotIngestIfa - errors', () => {
12497
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
12498
+ try {
12499
+ a.retrieveHealthbotIngestIfa(null, (data, error) => {
12500
+ try {
12501
+ if (stub) {
12502
+ const displayE = 'Error 400 received on request';
12503
+ runErrorAsserts(data, error, 'AD.500', 'Test-paragon_insights-connectorRest-handleEndResponse', displayE);
12504
+ } else {
12505
+ runCommonAsserts(data, error);
12506
+ }
12507
+ saveMockData('Config', 'retrieveHealthbotIngestIfa', 'default', data);
12508
+ done();
12509
+ } catch (err) {
12510
+ log.error(`Test Failure: ${err}`);
12511
+ done(err);
12512
+ }
12513
+ });
12514
+ } catch (error) {
12515
+ log.error(`Adapter Exception: ${error}`);
12516
+ done(error);
12517
+ }
12518
+ }).timeout(attemptTimeout);
12519
+ });
12520
+
12521
+ const configCreateHealthbotIngestIfaBodyParam = {};
12522
+ describe('#createHealthbotIngestIfa - errors', () => {
12523
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
12524
+ try {
12525
+ a.createHealthbotIngestIfa(configCreateHealthbotIngestIfaBodyParam, (data, error) => {
12526
+ try {
12527
+ if (stub) {
12528
+ const displayE = 'Error 400 received on request';
12529
+ runErrorAsserts(data, error, 'AD.500', 'Test-paragon_insights-connectorRest-handleEndResponse', displayE);
12530
+ } else {
12531
+ runCommonAsserts(data, error);
12532
+ }
12533
+ saveMockData('Config', 'createHealthbotIngestIfa', 'default', data);
12534
+ done();
12535
+ } catch (err) {
12536
+ log.error(`Test Failure: ${err}`);
12537
+ done(err);
12538
+ }
12539
+ });
12540
+ } catch (error) {
12541
+ log.error(`Adapter Exception: ${error}`);
12542
+ done(error);
12543
+ }
12544
+ }).timeout(attemptTimeout);
12545
+ });
12546
+
12547
+ const configUpdateHealthbotIngestIfaBodyParam = {};
12548
+ describe('#updateHealthbotIngestIfa - errors', () => {
12549
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
12550
+ try {
12551
+ a.updateHealthbotIngestIfa(configUpdateHealthbotIngestIfaBodyParam, (data, error) => {
12552
+ try {
12553
+ if (stub) {
12554
+ const displayE = 'Error 400 received on request';
12555
+ runErrorAsserts(data, error, 'AD.500', 'Test-paragon_insights-connectorRest-handleEndResponse', displayE);
12556
+ } else {
12557
+ runCommonAsserts(data, error);
12558
+ }
12559
+ saveMockData('Config', 'updateHealthbotIngestIfa', 'default', data);
12560
+ done();
12561
+ } catch (err) {
12562
+ log.error(`Test Failure: ${err}`);
12563
+ done(err);
12564
+ }
12565
+ });
12566
+ } catch (error) {
12567
+ log.error(`Adapter Exception: ${error}`);
12568
+ done(error);
12569
+ }
12570
+ }).timeout(attemptTimeout);
12571
+ });
12572
+
12573
+ describe('#retrieveHealthbotIngestIfaDeviceIds - errors', () => {
12574
+ it('should work if integrated or standalone with mockdata', (done) => {
12575
+ try {
12576
+ a.retrieveHealthbotIngestIfaDeviceIds(null, (data, error) => {
12577
+ try {
12578
+ if (stub) {
12579
+ runCommonAsserts(data, error);
12580
+ assert.equal('string', data.response[0]);
12581
+ assert.equal('string', data.response[1]);
12582
+ } else {
12583
+ runCommonAsserts(data, error);
12584
+ }
12585
+ saveMockData('Config', 'retrieveHealthbotIngestIfaDeviceIds', 'default', data);
12586
+ done();
12587
+ } catch (err) {
12588
+ log.error(`Test Failure: ${err}`);
12589
+ done(err);
12590
+ }
12591
+ });
12592
+ } catch (error) {
12593
+ log.error(`Adapter Exception: ${error}`);
12594
+ done(error);
12595
+ }
12596
+ }).timeout(attemptTimeout);
12597
+ });
12598
+
12599
+ describe('#retrieveHealthbotIngestIfaDevices - errors', () => {
12600
+ it('should work if integrated or standalone with mockdata', (done) => {
12601
+ try {
12602
+ a.retrieveHealthbotIngestIfaDevices(null, (data, error) => {
12603
+ try {
12604
+ if (stub) {
12605
+ runCommonAsserts(data, error);
12606
+ assert.equal('object', typeof data.response[0]);
12607
+ assert.equal('object', typeof data.response[1]);
12608
+ } else {
12609
+ runCommonAsserts(data, error);
12610
+ }
12611
+ saveMockData('Config', 'retrieveHealthbotIngestIfaDevices', 'default', data);
12612
+ done();
12613
+ } catch (err) {
12614
+ log.error(`Test Failure: ${err}`);
12615
+ done(err);
12616
+ }
12617
+ });
12618
+ } catch (error) {
12619
+ log.error(`Adapter Exception: ${error}`);
12620
+ done(error);
12621
+ }
12622
+ }).timeout(attemptTimeout);
12623
+ });
12624
+
12625
+ describe('#deleteHealthbotIngestIfaDeviceById - errors', () => {
12626
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
12627
+ try {
12628
+ a.deleteHealthbotIngestIfaDeviceById(555, (data, error) => {
12629
+ try {
12630
+ if (stub) {
12631
+ const displayE = 'Error 400 received on request';
12632
+ runErrorAsserts(data, error, 'AD.500', 'Test-paragon_insights-connectorRest-handleEndResponse', displayE);
12633
+ } else {
12634
+ runCommonAsserts(data, error);
12635
+ }
12636
+ saveMockData('Config', 'deleteHealthbotIngestIfaDeviceById', 'default', data);
12637
+ done();
12638
+ } catch (err) {
12639
+ log.error(`Test Failure: ${err}`);
12640
+ done(err);
12641
+ }
12642
+ });
12643
+ } catch (error) {
12644
+ log.error(`Adapter Exception: ${error}`);
12645
+ done(error);
12646
+ }
12647
+ }).timeout(attemptTimeout);
12648
+ });
12649
+
12650
+ describe('#retrieveHealthbotIngestIfaDeviceById - errors', () => {
12651
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
12652
+ try {
12653
+ a.retrieveHealthbotIngestIfaDeviceById(555, null, (data, error) => {
12654
+ try {
12655
+ if (stub) {
12656
+ const displayE = 'Error 400 received on request';
12657
+ runErrorAsserts(data, error, 'AD.500', 'Test-paragon_insights-connectorRest-handleEndResponse', displayE);
12658
+ } else {
12659
+ runCommonAsserts(data, error);
12660
+ }
12661
+ saveMockData('Config', 'retrieveHealthbotIngestIfaDeviceById', 'default', data);
12662
+ done();
12663
+ } catch (err) {
12664
+ log.error(`Test Failure: ${err}`);
12665
+ done(err);
12666
+ }
12667
+ });
12668
+ } catch (error) {
12669
+ log.error(`Adapter Exception: ${error}`);
12670
+ done(error);
12671
+ }
12672
+ }).timeout(attemptTimeout);
12673
+ });
12674
+
12675
+ const configCreateHealthbotIngestIfaDeviceByIdBodyParam = {};
12676
+ describe('#createHealthbotIngestIfaDeviceById - errors', () => {
12677
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
12678
+ try {
12679
+ a.createHealthbotIngestIfaDeviceById(555, configCreateHealthbotIngestIfaDeviceByIdBodyParam, (data, error) => {
12680
+ try {
12681
+ if (stub) {
12682
+ const displayE = 'Error 400 received on request';
12683
+ runErrorAsserts(data, error, 'AD.500', 'Test-paragon_insights-connectorRest-handleEndResponse', displayE);
12684
+ } else {
12685
+ runCommonAsserts(data, error);
12686
+ }
12687
+ saveMockData('Config', 'createHealthbotIngestIfaDeviceById', 'default', data);
12688
+ done();
12689
+ } catch (err) {
12690
+ log.error(`Test Failure: ${err}`);
12691
+ done(err);
12692
+ }
12693
+ });
12694
+ } catch (error) {
12695
+ log.error(`Adapter Exception: ${error}`);
12696
+ done(error);
12697
+ }
12698
+ }).timeout(attemptTimeout);
12699
+ });
12700
+
12701
+ const configUpdateHealthbotIngestIfaDeviceByIdBodyParam = {};
12702
+ describe('#updateHealthbotIngestIfaDeviceById - errors', () => {
12703
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
12704
+ try {
12705
+ a.updateHealthbotIngestIfaDeviceById('fakedata', configUpdateHealthbotIngestIfaDeviceByIdBodyParam, (data, error) => {
12706
+ try {
12707
+ if (stub) {
12708
+ const displayE = 'Error 400 received on request';
12709
+ runErrorAsserts(data, error, 'AD.500', 'Test-paragon_insights-connectorRest-handleEndResponse', displayE);
12710
+ } else {
12711
+ runCommonAsserts(data, error);
12712
+ }
12713
+ saveMockData('Config', 'updateHealthbotIngestIfaDeviceById', 'default', data);
12714
+ done();
12715
+ } catch (err) {
12716
+ log.error(`Test Failure: ${err}`);
12717
+ done(err);
12718
+ }
12719
+ });
12720
+ } catch (error) {
12721
+ log.error(`Adapter Exception: ${error}`);
12722
+ done(error);
12723
+ }
12724
+ }).timeout(attemptTimeout);
12725
+ });
12726
+
12727
+ const utilityPostJunosEncodeBodyParam = {};
12728
+ describe('#postJunosEncode - errors', () => {
12729
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
12730
+ try {
12731
+ a.postJunosEncode(utilityPostJunosEncodeBodyParam, (data, error) => {
12732
+ try {
12733
+ if (stub) {
12734
+ const displayE = 'Error 400 received on request';
12735
+ runErrorAsserts(data, error, 'AD.500', 'Test-paragon_insights-connectorRest-handleEndResponse', displayE);
12736
+ } else {
12737
+ runCommonAsserts(data, error);
12738
+ }
12739
+ saveMockData('Utility', 'postJunosEncode', 'default', data);
12740
+ done();
12741
+ } catch (err) {
12742
+ log.error(`Test Failure: ${err}`);
12743
+ done(err);
12744
+ }
12745
+ });
12746
+ } catch (error) {
12747
+ log.error(`Adapter Exception: ${error}`);
12748
+ done(error);
12749
+ }
12750
+ }).timeout(attemptTimeout);
12751
+ });
12752
+
12753
+ const utilityPostJunosDecodeBodyParam = {};
12754
+ describe('#postJunosDecode - errors', () => {
12755
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
12756
+ try {
12757
+ a.postJunosDecode(utilityPostJunosDecodeBodyParam, (data, error) => {
12758
+ try {
12759
+ if (stub) {
12760
+ const displayE = 'Error 400 received on request';
12761
+ runErrorAsserts(data, error, 'AD.500', 'Test-paragon_insights-connectorRest-handleEndResponse', displayE);
12762
+ } else {
12763
+ runCommonAsserts(data, error);
12764
+ }
12765
+ saveMockData('Utility', 'postJunosDecode', 'default', data);
12766
+ done();
12767
+ } catch (err) {
12768
+ log.error(`Test Failure: ${err}`);
12769
+ done(err);
12770
+ }
12771
+ });
12772
+ } catch (error) {
12773
+ log.error(`Adapter Exception: ${error}`);
12774
+ done(error);
12775
+ }
12776
+ }).timeout(attemptTimeout);
12777
+ });
12268
12778
  });
12269
12779
  });
@@ -831,9 +831,11 @@ describe('[unit] Adapter Base Test', () => {
831
831
  assert.equal('patchGenericNoBase', expectedCapabilities[0].actions[8]);
832
832
  assert.equal('deleteGenericNoBase', expectedCapabilities[0].actions[9]);
833
833
  assert.equal('.system', expectedCapabilities[1].entity);
834
- assert.equal(2, expectedCapabilities[1].actions.length);
834
+ assert.equal(4, expectedCapabilities[1].actions.length);
835
835
  assert.equal('getToken', expectedCapabilities[1].actions[0]);
836
- assert.equal('healthcheck', expectedCapabilities[1].actions[1]);
836
+ assert.equal('MFA_Step_1', expectedCapabilities[1].actions[1]);
837
+ assert.equal('MFA_Step_2', expectedCapabilities[1].actions[2]);
838
+ assert.equal('healthcheck', expectedCapabilities[1].actions[3]);
837
839
  for (let e = 1; e < expectedCapabilities.length; e += 1) {
838
840
  assert.notEqual('', expectedCapabilities[e].entity);
839
841
  assert.notEqual(null, expectedCapabilities[e].actions);