@itentialopensource/adapter-netbrain 1.3.5 → 1.3.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.
@@ -3067,5 +3067,871 @@ describe('[integration] Netbrain Adapter Test', () => {
3067
3067
  }
3068
3068
  }).timeout(attemptTimeout);
3069
3069
  });
3070
+
3071
+ describe('#getcmdbChangeAnalysisExportTasksStatus - errors', () => {
3072
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3073
+ try {
3074
+ a.getcmdbChangeAnalysisExportTasksStatus('fakedata', null, (data, error) => {
3075
+ try {
3076
+ if (stub) {
3077
+ const displayE = 'Error 400 received on request';
3078
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3079
+ } else {
3080
+ runCommonAsserts(data, error);
3081
+ }
3082
+ saveMockData('ChangeAnalysisReport', 'getcmdbChangeAnalysisExportTasksStatus', 'default', data);
3083
+ done();
3084
+ } catch (err) {
3085
+ log.error(`Test Failure: ${err}`);
3086
+ done(err);
3087
+ }
3088
+ });
3089
+ } catch (error) {
3090
+ log.error(`Adapter Exception: ${error}`);
3091
+ done(error);
3092
+ }
3093
+ }).timeout(attemptTimeout);
3094
+ });
3095
+
3096
+ const changeAnalysisReportPostcmdbChangeAnalysisExportTasksBodyParam = {};
3097
+ describe('#postcmdbChangeAnalysisExportTasks - errors', () => {
3098
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3099
+ try {
3100
+ a.postcmdbChangeAnalysisExportTasks(changeAnalysisReportPostcmdbChangeAnalysisExportTasksBodyParam, null, (data, error) => {
3101
+ try {
3102
+ if (stub) {
3103
+ const displayE = 'Error 400 received on request';
3104
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3105
+ } else {
3106
+ runCommonAsserts(data, error);
3107
+ }
3108
+ saveMockData('ChangeAnalysisReport', 'postcmdbChangeAnalysisExportTasks', 'default', data);
3109
+ done();
3110
+ } catch (err) {
3111
+ log.error(`Test Failure: ${err}`);
3112
+ done(err);
3113
+ }
3114
+ });
3115
+ } catch (error) {
3116
+ log.error(`Adapter Exception: ${error}`);
3117
+ done(error);
3118
+ }
3119
+ }).timeout(attemptTimeout);
3120
+ });
3121
+
3122
+ describe('#getcmdbChangeAnalysisExportTasks12345Download - errors', () => {
3123
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3124
+ try {
3125
+ a.getcmdbChangeAnalysisExportTasks12345Download(null, (data, error) => {
3126
+ try {
3127
+ if (stub) {
3128
+ const displayE = 'Error 400 received on request';
3129
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3130
+ } else {
3131
+ runCommonAsserts(data, error);
3132
+ }
3133
+ saveMockData('ChangeAnalysisReport', 'getcmdbChangeAnalysisExportTasks12345Download', 'default', data);
3134
+ done();
3135
+ } catch (err) {
3136
+ log.error(`Test Failure: ${err}`);
3137
+ done(err);
3138
+ }
3139
+ });
3140
+ } catch (error) {
3141
+ log.error(`Adapter Exception: ${error}`);
3142
+ done(error);
3143
+ }
3144
+ }).timeout(attemptTimeout);
3145
+ });
3146
+
3147
+ const changeManagementPostcmdbCMTasksScheduledTaskBodyParam = {};
3148
+ describe('#postcmdbCMTasksScheduledTask - errors', () => {
3149
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3150
+ try {
3151
+ a.postcmdbCMTasksScheduledTask(changeManagementPostcmdbCMTasksScheduledTaskBodyParam, null, (data, error) => {
3152
+ try {
3153
+ if (stub) {
3154
+ const displayE = 'Error 400 received on request';
3155
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3156
+ } else {
3157
+ runCommonAsserts(data, error);
3158
+ }
3159
+ saveMockData('ChangeManagement', 'postcmdbCMTasksScheduledTask', 'default', data);
3160
+ done();
3161
+ } catch (err) {
3162
+ log.error(`Test Failure: ${err}`);
3163
+ done(err);
3164
+ }
3165
+ });
3166
+ } catch (error) {
3167
+ log.error(`Adapter Exception: ${error}`);
3168
+ done(error);
3169
+ }
3170
+ }).timeout(attemptTimeout);
3171
+ });
3172
+
3173
+ describe('#getcmdbCMTasksScheduledTask - errors', () => {
3174
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3175
+ try {
3176
+ a.getcmdbCMTasksScheduledTask(null, (data, error) => {
3177
+ try {
3178
+ if (stub) {
3179
+ const displayE = 'Error 400 received on request';
3180
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3181
+ } else {
3182
+ runCommonAsserts(data, error);
3183
+ }
3184
+ saveMockData('ChangeManagement', 'getcmdbCMTasksScheduledTask', 'default', data);
3185
+ done();
3186
+ } catch (err) {
3187
+ log.error(`Test Failure: ${err}`);
3188
+ done(err);
3189
+ }
3190
+ });
3191
+ } catch (error) {
3192
+ log.error(`Adapter Exception: ${error}`);
3193
+ done(error);
3194
+ }
3195
+ }).timeout(attemptTimeout);
3196
+ });
3197
+
3198
+ const changeManagementPutcmdbCMTasksScheduledTaskBodyParam = {};
3199
+ describe('#putcmdbCMTasksScheduledTask - errors', () => {
3200
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3201
+ try {
3202
+ a.putcmdbCMTasksScheduledTask(changeManagementPutcmdbCMTasksScheduledTaskBodyParam, null, (data, error) => {
3203
+ try {
3204
+ if (stub) {
3205
+ const displayE = 'Error 400 received on request';
3206
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3207
+ } else {
3208
+ runCommonAsserts(data, error);
3209
+ }
3210
+ saveMockData('ChangeManagement', 'putcmdbCMTasksScheduledTask', 'default', data);
3211
+ done();
3212
+ } catch (err) {
3213
+ log.error(`Test Failure: ${err}`);
3214
+ done(err);
3215
+ }
3216
+ });
3217
+ } catch (error) {
3218
+ log.error(`Adapter Exception: ${error}`);
3219
+ done(error);
3220
+ }
3221
+ }).timeout(attemptTimeout);
3222
+ });
3223
+
3224
+ describe('#deletecmTasksScheduleTask - errors', () => {
3225
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3226
+ try {
3227
+ a.deletecmTasksScheduleTask('fakedata', null, (data, error) => {
3228
+ try {
3229
+ if (stub) {
3230
+ const displayE = 'Error 400 received on request';
3231
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3232
+ } else {
3233
+ runCommonAsserts(data, error);
3234
+ }
3235
+ saveMockData('ChangeManagement', 'deletecmTasksScheduleTask', 'default', data);
3236
+ done();
3237
+ } catch (err) {
3238
+ log.error(`Test Failure: ${err}`);
3239
+ done(err);
3240
+ }
3241
+ });
3242
+ } catch (error) {
3243
+ log.error(`Adapter Exception: ${error}`);
3244
+ done(error);
3245
+ }
3246
+ }).timeout(attemptTimeout);
3247
+ });
3248
+
3249
+ const changeManagementPostcmBindingBodyParam = {};
3250
+ describe('#postcmBinding - errors', () => {
3251
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3252
+ try {
3253
+ a.postcmBinding(changeManagementPostcmBindingBodyParam, null, (data, error) => {
3254
+ try {
3255
+ if (stub) {
3256
+ const displayE = 'Error 400 received on request';
3257
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3258
+ } else {
3259
+ runCommonAsserts(data, error);
3260
+ }
3261
+ saveMockData('ChangeManagement', 'postcmBinding', 'default', data);
3262
+ done();
3263
+ } catch (err) {
3264
+ log.error(`Test Failure: ${err}`);
3265
+ done(err);
3266
+ }
3267
+ });
3268
+ } catch (error) {
3269
+ log.error(`Adapter Exception: ${error}`);
3270
+ done(error);
3271
+ }
3272
+ }).timeout(attemptTimeout);
3273
+ });
3274
+
3275
+ const changeManagementPostcmApprovalStateBodyParam = {};
3276
+ describe('#postcmApprovalState - errors', () => {
3277
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3278
+ try {
3279
+ a.postcmApprovalState(changeManagementPostcmApprovalStateBodyParam, null, (data, error) => {
3280
+ try {
3281
+ if (stub) {
3282
+ const displayE = 'Error 400 received on request';
3283
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3284
+ } else {
3285
+ runCommonAsserts(data, error);
3286
+ }
3287
+ saveMockData('ChangeManagement', 'postcmApprovalState', 'default', data);
3288
+ done();
3289
+ } catch (err) {
3290
+ log.error(`Test Failure: ${err}`);
3291
+ done(err);
3292
+ }
3293
+ });
3294
+ } catch (error) {
3295
+ log.error(`Adapter Exception: ${error}`);
3296
+ done(error);
3297
+ }
3298
+ }).timeout(attemptTimeout);
3299
+ });
3300
+
3301
+ const deviceAccessControlPostcmdbDeviceAccessPolicyBodyParam = {};
3302
+ describe('#postcmdbDeviceAccessPolicy - errors', () => {
3303
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3304
+ try {
3305
+ a.postcmdbDeviceAccessPolicy(deviceAccessControlPostcmdbDeviceAccessPolicyBodyParam, null, (data, error) => {
3306
+ try {
3307
+ if (stub) {
3308
+ const displayE = 'Error 400 received on request';
3309
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3310
+ } else {
3311
+ runCommonAsserts(data, error);
3312
+ }
3313
+ saveMockData('DeviceAccessControl', 'postcmdbDeviceAccessPolicy', 'default', data);
3314
+ done();
3315
+ } catch (err) {
3316
+ log.error(`Test Failure: ${err}`);
3317
+ done(err);
3318
+ }
3319
+ });
3320
+ } catch (error) {
3321
+ log.error(`Adapter Exception: ${error}`);
3322
+ done(error);
3323
+ }
3324
+ }).timeout(attemptTimeout);
3325
+ });
3326
+
3327
+ describe('#getcmdbDeviceAccessPolicy - errors', () => {
3328
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3329
+ try {
3330
+ a.getcmdbDeviceAccessPolicy('fakedata', null, (data, error) => {
3331
+ try {
3332
+ if (stub) {
3333
+ const displayE = 'Error 400 received on request';
3334
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3335
+ } else {
3336
+ runCommonAsserts(data, error);
3337
+ }
3338
+ saveMockData('DeviceAccessControl', 'getcmdbDeviceAccessPolicy', 'default', data);
3339
+ done();
3340
+ } catch (err) {
3341
+ log.error(`Test Failure: ${err}`);
3342
+ done(err);
3343
+ }
3344
+ });
3345
+ } catch (error) {
3346
+ log.error(`Adapter Exception: ${error}`);
3347
+ done(error);
3348
+ }
3349
+ }).timeout(attemptTimeout);
3350
+ });
3351
+
3352
+ const deviceAccessControlPutcmdbDeviceAccessPolicyBodyParam = {};
3353
+ describe('#putcmdbDeviceAccessPolicy - errors', () => {
3354
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3355
+ try {
3356
+ a.putcmdbDeviceAccessPolicy(deviceAccessControlPutcmdbDeviceAccessPolicyBodyParam, null, (data, error) => {
3357
+ try {
3358
+ if (stub) {
3359
+ const displayE = 'Error 400 received on request';
3360
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3361
+ } else {
3362
+ runCommonAsserts(data, error);
3363
+ }
3364
+ saveMockData('DeviceAccessControl', 'putcmdbDeviceAccessPolicy', 'default', data);
3365
+ done();
3366
+ } catch (err) {
3367
+ log.error(`Test Failure: ${err}`);
3368
+ done(err);
3369
+ }
3370
+ });
3371
+ } catch (error) {
3372
+ log.error(`Adapter Exception: ${error}`);
3373
+ done(error);
3374
+ }
3375
+ }).timeout(attemptTimeout);
3376
+ });
3377
+
3378
+ const deviceAccessControlPostcmdbUserDeviceAccessPolicyAssignDeviceAccessPoliciesBodyParam = {};
3379
+ describe('#postcmdbUserDeviceAccessPolicyAssignDeviceAccessPolicies - errors', () => {
3380
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3381
+ try {
3382
+ a.postcmdbUserDeviceAccessPolicyAssignDeviceAccessPolicies(deviceAccessControlPostcmdbUserDeviceAccessPolicyAssignDeviceAccessPoliciesBodyParam, null, (data, error) => {
3383
+ try {
3384
+ if (stub) {
3385
+ const displayE = 'Error 400 received on request';
3386
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3387
+ } else {
3388
+ runCommonAsserts(data, error);
3389
+ }
3390
+ saveMockData('DeviceAccessControl', 'postcmdbUserDeviceAccessPolicyAssignDeviceAccessPolicies', 'default', data);
3391
+ done();
3392
+ } catch (err) {
3393
+ log.error(`Test Failure: ${err}`);
3394
+ done(err);
3395
+ }
3396
+ });
3397
+ } catch (error) {
3398
+ log.error(`Adapter Exception: ${error}`);
3399
+ done(error);
3400
+ }
3401
+ }).timeout(attemptTimeout);
3402
+ });
3403
+
3404
+ describe('#deletecmdbDeviceAccessPolicy - errors', () => {
3405
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3406
+ try {
3407
+ a.deletecmdbDeviceAccessPolicy(null, null, (data, error) => {
3408
+ try {
3409
+ if (stub) {
3410
+ const displayE = 'Error 400 received on request';
3411
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3412
+ } else {
3413
+ runCommonAsserts(data, error);
3414
+ }
3415
+ saveMockData('DeviceAccessControl', 'deletecmdbDeviceAccessPolicy', 'default', data);
3416
+ done();
3417
+ } catch (err) {
3418
+ log.error(`Test Failure: ${err}`);
3419
+ done(err);
3420
+ }
3421
+ });
3422
+ } catch (error) {
3423
+ log.error(`Adapter Exception: ${error}`);
3424
+ done(error);
3425
+ }
3426
+ }).timeout(attemptTimeout);
3427
+ });
3428
+
3429
+ describe('#getcmdbUserDeviceAccessPolicy - errors', () => {
3430
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3431
+ try {
3432
+ a.getcmdbUserDeviceAccessPolicy('fakedata', 'fakedata', null, (data, error) => {
3433
+ try {
3434
+ if (stub) {
3435
+ const displayE = 'Error 400 received on request';
3436
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3437
+ } else {
3438
+ runCommonAsserts(data, error);
3439
+ }
3440
+ saveMockData('DeviceAccessControl', 'getcmdbUserDeviceAccessPolicy', 'default', data);
3441
+ done();
3442
+ } catch (err) {
3443
+ log.error(`Test Failure: ${err}`);
3444
+ done(err);
3445
+ }
3446
+ });
3447
+ } catch (error) {
3448
+ log.error(`Adapter Exception: ${error}`);
3449
+ done(error);
3450
+ }
3451
+ }).timeout(attemptTimeout);
3452
+ });
3453
+
3454
+ describe('#deletecmdbUserDeviceAccessPolicy - errors', () => {
3455
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3456
+ try {
3457
+ a.deletecmdbUserDeviceAccessPolicy(null, (data, error) => {
3458
+ try {
3459
+ if (stub) {
3460
+ const displayE = 'Error 400 received on request';
3461
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3462
+ } else {
3463
+ runCommonAsserts(data, error);
3464
+ }
3465
+ saveMockData('DeviceAccessControl', 'deletecmdbUserDeviceAccessPolicy', 'default', data);
3466
+ done();
3467
+ } catch (err) {
3468
+ log.error(`Test Failure: ${err}`);
3469
+ done(err);
3470
+ }
3471
+ });
3472
+ } catch (error) {
3473
+ log.error(`Adapter Exception: ${error}`);
3474
+ done(error);
3475
+ }
3476
+ }).timeout(attemptTimeout);
3477
+ });
3478
+
3479
+ const deviceAccessControlPostcmdbUserDeviceAccessPolicyBodyParam = {};
3480
+ describe('#postcmdbUserDeviceAccessPolicy - errors', () => {
3481
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3482
+ try {
3483
+ a.postcmdbUserDeviceAccessPolicy(deviceAccessControlPostcmdbUserDeviceAccessPolicyBodyParam, null, (data, error) => {
3484
+ try {
3485
+ if (stub) {
3486
+ const displayE = 'Error 400 received on request';
3487
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3488
+ } else {
3489
+ runCommonAsserts(data, error);
3490
+ }
3491
+ saveMockData('DeviceAccessControl', 'postcmdbUserDeviceAccessPolicy', 'default', data);
3492
+ done();
3493
+ } catch (err) {
3494
+ log.error(`Test Failure: ${err}`);
3495
+ done(err);
3496
+ }
3497
+ });
3498
+ } catch (error) {
3499
+ log.error(`Adapter Exception: ${error}`);
3500
+ done(error);
3501
+ }
3502
+ }).timeout(attemptTimeout);
3503
+ });
3504
+
3505
+ describe('#getcmdbUserDeviceAccessPolicyUsersOfDeviceAccessPolicy - errors', () => {
3506
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3507
+ try {
3508
+ a.getcmdbUserDeviceAccessPolicyUsersOfDeviceAccessPolicy('fakedata', null, (data, error) => {
3509
+ try {
3510
+ if (stub) {
3511
+ const displayE = 'Error 400 received on request';
3512
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3513
+ } else {
3514
+ runCommonAsserts(data, error);
3515
+ }
3516
+ saveMockData('DeviceAccessControl', 'getcmdbUserDeviceAccessPolicyUsersOfDeviceAccessPolicy', 'default', data);
3517
+ done();
3518
+ } catch (err) {
3519
+ log.error(`Test Failure: ${err}`);
3520
+ done(err);
3521
+ }
3522
+ });
3523
+ } catch (error) {
3524
+ log.error(`Adapter Exception: ${error}`);
3525
+ done(error);
3526
+ }
3527
+ }).timeout(attemptTimeout);
3528
+ });
3529
+
3530
+ const deviceGroupManagementPostcmdbDeviceGroupsBodyParam = {};
3531
+ describe('#postcmdbDeviceGroups - errors', () => {
3532
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3533
+ try {
3534
+ a.postcmdbDeviceGroups(deviceGroupManagementPostcmdbDeviceGroupsBodyParam, null, (data, error) => {
3535
+ try {
3536
+ if (stub) {
3537
+ const displayE = 'Error 400 received on request';
3538
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3539
+ } else {
3540
+ runCommonAsserts(data, error);
3541
+ }
3542
+ saveMockData('DeviceGroupManagement', 'postcmdbDeviceGroups', 'default', data);
3543
+ done();
3544
+ } catch (err) {
3545
+ log.error(`Test Failure: ${err}`);
3546
+ done(err);
3547
+ }
3548
+ });
3549
+ } catch (error) {
3550
+ log.error(`Adapter Exception: ${error}`);
3551
+ done(error);
3552
+ }
3553
+ }).timeout(attemptTimeout);
3554
+ });
3555
+
3556
+ const deviceGroupManagementPostcmdbDeviceGroupsDevicesBodyParam = {};
3557
+ describe('#postcmdbDeviceGroupsDevices - errors', () => {
3558
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3559
+ try {
3560
+ a.postcmdbDeviceGroupsDevices('fakedata', deviceGroupManagementPostcmdbDeviceGroupsDevicesBodyParam, null, (data, error) => {
3561
+ try {
3562
+ if (stub) {
3563
+ const displayE = 'Error 400 received on request';
3564
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3565
+ } else {
3566
+ runCommonAsserts(data, error);
3567
+ }
3568
+ saveMockData('DeviceGroupManagement', 'postcmdbDeviceGroupsDevices', 'default', data);
3569
+ done();
3570
+ } catch (err) {
3571
+ log.error(`Test Failure: ${err}`);
3572
+ done(err);
3573
+ }
3574
+ });
3575
+ } catch (error) {
3576
+ log.error(`Adapter Exception: ${error}`);
3577
+ done(error);
3578
+ }
3579
+ }).timeout(attemptTimeout);
3580
+ });
3581
+
3582
+ describe('#deletecmdbDeviceGroupsDevices - errors', () => {
3583
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3584
+ try {
3585
+ a.deletecmdbDeviceGroupsDevices('fakedata', null, (data, error) => {
3586
+ try {
3587
+ if (stub) {
3588
+ const displayE = 'Error 400 received on request';
3589
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3590
+ } else {
3591
+ runCommonAsserts(data, error);
3592
+ }
3593
+ saveMockData('DeviceGroupManagement', 'deletecmdbDeviceGroupsDevices', 'default', data);
3594
+ done();
3595
+ } catch (err) {
3596
+ log.error(`Test Failure: ${err}`);
3597
+ done(err);
3598
+ }
3599
+ });
3600
+ } catch (error) {
3601
+ log.error(`Adapter Exception: ${error}`);
3602
+ done(error);
3603
+ }
3604
+ }).timeout(attemptTimeout);
3605
+ });
3606
+
3607
+ describe('#getcmdbDeviceGroupsDevices - errors', () => {
3608
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3609
+ try {
3610
+ a.getcmdbDeviceGroupsDevices('fakedata', null, (data, error) => {
3611
+ try {
3612
+ if (stub) {
3613
+ const displayE = 'Error 400 received on request';
3614
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3615
+ } else {
3616
+ runCommonAsserts(data, error);
3617
+ }
3618
+ saveMockData('DeviceGroupManagement', 'getcmdbDeviceGroupsDevices', 'default', data);
3619
+ done();
3620
+ } catch (err) {
3621
+ log.error(`Test Failure: ${err}`);
3622
+ done(err);
3623
+ }
3624
+ });
3625
+ } catch (error) {
3626
+ log.error(`Adapter Exception: ${error}`);
3627
+ done(error);
3628
+ }
3629
+ }).timeout(attemptTimeout);
3630
+ });
3631
+
3632
+ describe('#deletecmdbDeviceGroups - errors', () => {
3633
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3634
+ try {
3635
+ a.deletecmdbDeviceGroups('fakedata', null, (data, error) => {
3636
+ try {
3637
+ if (stub) {
3638
+ const displayE = 'Error 400 received on request';
3639
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3640
+ } else {
3641
+ runCommonAsserts(data, error);
3642
+ }
3643
+ saveMockData('DeviceGroupManagement', 'deletecmdbDeviceGroups', 'default', data);
3644
+ done();
3645
+ } catch (err) {
3646
+ log.error(`Test Failure: ${err}`);
3647
+ done(err);
3648
+ }
3649
+ });
3650
+ } catch (error) {
3651
+ log.error(`Adapter Exception: ${error}`);
3652
+ done(error);
3653
+ }
3654
+ }).timeout(attemptTimeout);
3655
+ });
3656
+
3657
+ const deviceInterfacesManagementPostcmdbInterfacesAttributesBodyParam = {};
3658
+ describe('#postcmdbInterfacesAttributes - errors', () => {
3659
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3660
+ try {
3661
+ a.postcmdbInterfacesAttributes(deviceInterfacesManagementPostcmdbInterfacesAttributesBodyParam, null, (data, error) => {
3662
+ try {
3663
+ if (stub) {
3664
+ const displayE = 'Error 400 received on request';
3665
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3666
+ } else {
3667
+ runCommonAsserts(data, error);
3668
+ }
3669
+ saveMockData('DeviceInterfacesManagement', 'postcmdbInterfacesAttributes', 'default', data);
3670
+ done();
3671
+ } catch (err) {
3672
+ log.error(`Test Failure: ${err}`);
3673
+ done(err);
3674
+ }
3675
+ });
3676
+ } catch (error) {
3677
+ log.error(`Adapter Exception: ${error}`);
3678
+ done(error);
3679
+ }
3680
+ }).timeout(attemptTimeout);
3681
+ });
3682
+
3683
+ describe('#deletecmdbDiscoveryTasks - errors', () => {
3684
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3685
+ try {
3686
+ a.deletecmdbDiscoveryTasks('fakedata', null, (data, error) => {
3687
+ try {
3688
+ if (stub) {
3689
+ const displayE = 'Error 400 received on request';
3690
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3691
+ } else {
3692
+ runCommonAsserts(data, error);
3693
+ }
3694
+ saveMockData('DiscoveryTaskManagement', 'deletecmdbDiscoveryTasks', 'default', data);
3695
+ done();
3696
+ } catch (err) {
3697
+ log.error(`Test Failure: ${err}`);
3698
+ done(err);
3699
+ }
3700
+ });
3701
+ } catch (error) {
3702
+ log.error(`Adapter Exception: ${error}`);
3703
+ done(error);
3704
+ }
3705
+ }).timeout(attemptTimeout);
3706
+ });
3707
+
3708
+ const discoveryTaskManagementPutcmdbDiscoveryTasksBodyParam = {};
3709
+ describe('#putcmdbDiscoveryTasks - errors', () => {
3710
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3711
+ try {
3712
+ a.putcmdbDiscoveryTasks(discoveryTaskManagementPutcmdbDiscoveryTasksBodyParam, null, (data, error) => {
3713
+ try {
3714
+ if (stub) {
3715
+ const displayE = 'Error 400 received on request';
3716
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3717
+ } else {
3718
+ runCommonAsserts(data, error);
3719
+ }
3720
+ saveMockData('DiscoveryTaskManagement', 'putcmdbDiscoveryTasks', 'default', data);
3721
+ done();
3722
+ } catch (err) {
3723
+ log.error(`Test Failure: ${err}`);
3724
+ done(err);
3725
+ }
3726
+ });
3727
+ } catch (error) {
3728
+ log.error(`Adapter Exception: ${error}`);
3729
+ done(error);
3730
+ }
3731
+ }).timeout(attemptTimeout);
3732
+ });
3733
+
3734
+ const discoveryTaskManagementPostcmdbDiscoveryTasksBodyParam = {};
3735
+ describe('#postcmdbDiscoveryTasks - errors', () => {
3736
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3737
+ try {
3738
+ a.postcmdbDiscoveryTasks(discoveryTaskManagementPostcmdbDiscoveryTasksBodyParam, null, (data, error) => {
3739
+ try {
3740
+ if (stub) {
3741
+ const displayE = 'Error 400 received on request';
3742
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3743
+ } else {
3744
+ runCommonAsserts(data, error);
3745
+ }
3746
+ saveMockData('DiscoveryTaskManagement', 'postcmdbDiscoveryTasks', 'default', data);
3747
+ done();
3748
+ } catch (err) {
3749
+ log.error(`Test Failure: ${err}`);
3750
+ done(err);
3751
+ }
3752
+ });
3753
+ } catch (error) {
3754
+ log.error(`Adapter Exception: ${error}`);
3755
+ done(error);
3756
+ }
3757
+ }).timeout(attemptTimeout);
3758
+ });
3759
+
3760
+ describe('#getcmdbDiscoveryTasksResults - errors', () => {
3761
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3762
+ try {
3763
+ a.getcmdbDiscoveryTasksResults('fakedata', null, (data, error) => {
3764
+ try {
3765
+ if (stub) {
3766
+ const displayE = 'Error 400 received on request';
3767
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3768
+ } else {
3769
+ runCommonAsserts(data, error);
3770
+ }
3771
+ saveMockData('DiscoveryTaskManagement', 'getcmdbDiscoveryTasksResults', 'default', data);
3772
+ done();
3773
+ } catch (err) {
3774
+ log.error(`Test Failure: ${err}`);
3775
+ done(err);
3776
+ }
3777
+ });
3778
+ } catch (error) {
3779
+ log.error(`Adapter Exception: ${error}`);
3780
+ done(error);
3781
+ }
3782
+ }).timeout(attemptTimeout);
3783
+ });
3784
+
3785
+ describe('#deletecmdbEventConsole - errors', () => {
3786
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3787
+ try {
3788
+ a.deletecmdbEventConsole(null, (data, error) => {
3789
+ try {
3790
+ if (stub) {
3791
+ const displayE = 'Error 400 received on request';
3792
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3793
+ } else {
3794
+ runCommonAsserts(data, error);
3795
+ }
3796
+ saveMockData('EventConsoleManagement', 'deletecmdbEventConsole', 'default', data);
3797
+ done();
3798
+ } catch (err) {
3799
+ log.error(`Test Failure: ${err}`);
3800
+ done(err);
3801
+ }
3802
+ });
3803
+ } catch (error) {
3804
+ log.error(`Adapter Exception: ${error}`);
3805
+ done(error);
3806
+ }
3807
+ }).timeout(attemptTimeout);
3808
+ });
3809
+
3810
+ describe('#getcmdbEventConsole - errors', () => {
3811
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3812
+ try {
3813
+ a.getcmdbEventConsole('fakedata', 'fakedata', null, (data, error) => {
3814
+ try {
3815
+ if (stub) {
3816
+ const displayE = 'Error 400 received on request';
3817
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3818
+ } else {
3819
+ runCommonAsserts(data, error);
3820
+ }
3821
+ saveMockData('EventConsoleManagement', 'getcmdbEventConsole', 'default', data);
3822
+ done();
3823
+ } catch (err) {
3824
+ log.error(`Test Failure: ${err}`);
3825
+ done(err);
3826
+ }
3827
+ });
3828
+ } catch (error) {
3829
+ log.error(`Adapter Exception: ${error}`);
3830
+ done(error);
3831
+ }
3832
+ }).timeout(attemptTimeout);
3833
+ });
3834
+
3835
+ const incidentReportPostcmdbIncidentListBodyParam = {};
3836
+ describe('#postcmdbIncidentList - errors', () => {
3837
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3838
+ try {
3839
+ a.postcmdbIncidentList(incidentReportPostcmdbIncidentListBodyParam, null, (data, error) => {
3840
+ try {
3841
+ if (stub) {
3842
+ const displayE = 'Error 400 received on request';
3843
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3844
+ } else {
3845
+ runCommonAsserts(data, error);
3846
+ }
3847
+ saveMockData('IncidentReport', 'postcmdbIncidentList', 'default', data);
3848
+ done();
3849
+ } catch (err) {
3850
+ log.error(`Test Failure: ${err}`);
3851
+ done(err);
3852
+ }
3853
+ });
3854
+ } catch (error) {
3855
+ log.error(`Adapter Exception: ${error}`);
3856
+ done(error);
3857
+ }
3858
+ }).timeout(attemptTimeout);
3859
+ });
3860
+
3861
+ describe('#getcmdbNetworkSettingsTelnetInfoCheckDeviceCount - errors', () => {
3862
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3863
+ try {
3864
+ a.getcmdbNetworkSettingsTelnetInfoCheckDeviceCount('fakedata', null, (data, error) => {
3865
+ try {
3866
+ if (stub) {
3867
+ const displayE = 'Error 400 received on request';
3868
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3869
+ } else {
3870
+ runCommonAsserts(data, error);
3871
+ }
3872
+ saveMockData('NetworkSettings', 'getcmdbNetworkSettingsTelnetInfoCheckDeviceCount', 'default', data);
3873
+ done();
3874
+ } catch (err) {
3875
+ log.error(`Test Failure: ${err}`);
3876
+ done(err);
3877
+ }
3878
+ });
3879
+ } catch (error) {
3880
+ log.error(`Adapter Exception: ${error}`);
3881
+ done(error);
3882
+ }
3883
+ }).timeout(attemptTimeout);
3884
+ });
3885
+
3886
+ describe('#getcmdbNetworkSettingsTelnetInfoRefreshDeviceCount - errors', () => {
3887
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3888
+ try {
3889
+ a.getcmdbNetworkSettingsTelnetInfoRefreshDeviceCount(null, (data, error) => {
3890
+ try {
3891
+ if (stub) {
3892
+ const displayE = 'Error 400 received on request';
3893
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3894
+ } else {
3895
+ runCommonAsserts(data, error);
3896
+ }
3897
+ saveMockData('NetworkSettings', 'getcmdbNetworkSettingsTelnetInfoRefreshDeviceCount', 'default', data);
3898
+ done();
3899
+ } catch (err) {
3900
+ log.error(`Test Failure: ${err}`);
3901
+ done(err);
3902
+ }
3903
+ });
3904
+ } catch (error) {
3905
+ log.error(`Adapter Exception: ${error}`);
3906
+ done(error);
3907
+ }
3908
+ }).timeout(attemptTimeout);
3909
+ });
3910
+
3911
+ const siteManagementPutcmdbSitesLeafDynamicSearchBodyParam = {};
3912
+ describe('#putcmdbSitesLeafDynamicSearch - errors', () => {
3913
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3914
+ try {
3915
+ a.putcmdbSitesLeafDynamicSearch(siteManagementPutcmdbSitesLeafDynamicSearchBodyParam, null, (data, error) => {
3916
+ try {
3917
+ if (stub) {
3918
+ const displayE = 'Error 400 received on request';
3919
+ runErrorAsserts(data, error, 'AD.500', 'Test-netbrain-connectorRest-handleEndResponse', displayE);
3920
+ } else {
3921
+ runCommonAsserts(data, error);
3922
+ }
3923
+ saveMockData('SiteManagement', 'putcmdbSitesLeafDynamicSearch', 'default', data);
3924
+ done();
3925
+ } catch (err) {
3926
+ log.error(`Test Failure: ${err}`);
3927
+ done(err);
3928
+ }
3929
+ });
3930
+ } catch (error) {
3931
+ log.error(`Adapter Exception: ${error}`);
3932
+ done(error);
3933
+ }
3934
+ }).timeout(attemptTimeout);
3935
+ });
3070
3936
  });
3071
3937
  });