@itentialopensource/adapter-rubrik 0.6.4 → 1.0.0
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/CHANGELOG.md +16 -0
- package/adapter.js +1759 -0
- package/entities/ClusterManagement/action.json +438 -0
- package/entities/ClusterManagement/schema.json +39 -0
- package/package.json +6 -6
- package/pronghorn.json +847 -0
- package/report/auto-adapter-openapi.json +731 -0
- package/test/integration/adapterTestIntegration.js +531 -0
- package/test/unit/adapterTestUnit.js +339 -2
|
@@ -467,5 +467,536 @@ describe('[integration] Rubrik Adapter Test', () => {
|
|
|
467
467
|
}
|
|
468
468
|
}).timeout(attemptTimeout);
|
|
469
469
|
});
|
|
470
|
+
|
|
471
|
+
describe('#checkIfClusterLocked - errors', () => {
|
|
472
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
473
|
+
try {
|
|
474
|
+
a.checkIfClusterLocked(null, (data, error) => {
|
|
475
|
+
try {
|
|
476
|
+
if (stub) {
|
|
477
|
+
const displayE = 'Error 400 received on request';
|
|
478
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
479
|
+
} else {
|
|
480
|
+
runCommonAsserts(data, error);
|
|
481
|
+
}
|
|
482
|
+
saveMockData('ClusterManagement', 'checkIfClusterLocked', 'default', data);
|
|
483
|
+
done();
|
|
484
|
+
} catch (err) {
|
|
485
|
+
log.error(`Test Failure: ${err}`);
|
|
486
|
+
done(err);
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
} catch (error) {
|
|
490
|
+
log.error(`Adapter Exception: ${error}`);
|
|
491
|
+
done(error);
|
|
492
|
+
}
|
|
493
|
+
}).timeout(attemptTimeout);
|
|
494
|
+
});
|
|
495
|
+
|
|
496
|
+
describe('#getClusterWorkflowVersion - errors', () => {
|
|
497
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
498
|
+
try {
|
|
499
|
+
a.getClusterWorkflowVersion(null, (data, error) => {
|
|
500
|
+
try {
|
|
501
|
+
if (stub) {
|
|
502
|
+
const displayE = 'Error 400 received on request';
|
|
503
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
504
|
+
} else {
|
|
505
|
+
runCommonAsserts(data, error);
|
|
506
|
+
}
|
|
507
|
+
saveMockData('ClusterManagement', 'getClusterWorkflowVersion', 'default', data);
|
|
508
|
+
done();
|
|
509
|
+
} catch (err) {
|
|
510
|
+
log.error(`Test Failure: ${err}`);
|
|
511
|
+
done(err);
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
} catch (error) {
|
|
515
|
+
log.error(`Adapter Exception: ${error}`);
|
|
516
|
+
done(error);
|
|
517
|
+
}
|
|
518
|
+
}).timeout(attemptTimeout);
|
|
519
|
+
});
|
|
520
|
+
|
|
521
|
+
const clusterManagementConfigureVmanageBodyParam = {};
|
|
522
|
+
describe('#configureVmanage - errors', () => {
|
|
523
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
524
|
+
try {
|
|
525
|
+
a.configureVmanage(clusterManagementConfigureVmanageBodyParam, null, (data, error) => {
|
|
526
|
+
try {
|
|
527
|
+
if (stub) {
|
|
528
|
+
const displayE = 'Error 400 received on request';
|
|
529
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
530
|
+
} else {
|
|
531
|
+
runCommonAsserts(data, error);
|
|
532
|
+
}
|
|
533
|
+
saveMockData('ClusterManagement', 'configureVmanage', 'default', data);
|
|
534
|
+
done();
|
|
535
|
+
} catch (err) {
|
|
536
|
+
log.error(`Test Failure: ${err}`);
|
|
537
|
+
done(err);
|
|
538
|
+
}
|
|
539
|
+
});
|
|
540
|
+
} catch (error) {
|
|
541
|
+
log.error(`Adapter Exception: ${error}`);
|
|
542
|
+
done(error);
|
|
543
|
+
}
|
|
544
|
+
}).timeout(attemptTimeout);
|
|
545
|
+
});
|
|
546
|
+
|
|
547
|
+
describe('#getConnectedDevices - errors', () => {
|
|
548
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
549
|
+
try {
|
|
550
|
+
a.getConnectedDevices('fakedata', null, (data, error) => {
|
|
551
|
+
try {
|
|
552
|
+
if (stub) {
|
|
553
|
+
const displayE = 'Error 400 received on request';
|
|
554
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
555
|
+
} else {
|
|
556
|
+
runCommonAsserts(data, error);
|
|
557
|
+
}
|
|
558
|
+
saveMockData('ClusterManagement', 'getConnectedDevices', 'default', data);
|
|
559
|
+
done();
|
|
560
|
+
} catch (err) {
|
|
561
|
+
log.error(`Test Failure: ${err}`);
|
|
562
|
+
done(err);
|
|
563
|
+
}
|
|
564
|
+
});
|
|
565
|
+
} catch (error) {
|
|
566
|
+
log.error(`Adapter Exception: ${error}`);
|
|
567
|
+
done(error);
|
|
568
|
+
}
|
|
569
|
+
}).timeout(attemptTimeout);
|
|
570
|
+
});
|
|
571
|
+
|
|
572
|
+
describe('#healthDetails - errors', () => {
|
|
573
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
574
|
+
try {
|
|
575
|
+
a.healthDetails(null, (data, error) => {
|
|
576
|
+
try {
|
|
577
|
+
if (stub) {
|
|
578
|
+
const displayE = 'Error 400 received on request';
|
|
579
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
580
|
+
} else {
|
|
581
|
+
runCommonAsserts(data, error);
|
|
582
|
+
}
|
|
583
|
+
saveMockData('ClusterManagement', 'healthDetails', 'default', data);
|
|
584
|
+
done();
|
|
585
|
+
} catch (err) {
|
|
586
|
+
log.error(`Test Failure: ${err}`);
|
|
587
|
+
done(err);
|
|
588
|
+
}
|
|
589
|
+
});
|
|
590
|
+
} catch (error) {
|
|
591
|
+
log.error(`Adapter Exception: ${error}`);
|
|
592
|
+
done(error);
|
|
593
|
+
}
|
|
594
|
+
}).timeout(attemptTimeout);
|
|
595
|
+
});
|
|
596
|
+
|
|
597
|
+
describe('#healthStatusInfo - errors', () => {
|
|
598
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
599
|
+
try {
|
|
600
|
+
a.healthStatusInfo(null, (data, error) => {
|
|
601
|
+
try {
|
|
602
|
+
if (stub) {
|
|
603
|
+
const displayE = 'Error 400 received on request';
|
|
604
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
605
|
+
} else {
|
|
606
|
+
runCommonAsserts(data, error);
|
|
607
|
+
}
|
|
608
|
+
saveMockData('ClusterManagement', 'healthStatusInfo', 'default', data);
|
|
609
|
+
done();
|
|
610
|
+
} catch (err) {
|
|
611
|
+
log.error(`Test Failure: ${err}`);
|
|
612
|
+
done(err);
|
|
613
|
+
}
|
|
614
|
+
});
|
|
615
|
+
} catch (error) {
|
|
616
|
+
log.error(`Adapter Exception: ${error}`);
|
|
617
|
+
done(error);
|
|
618
|
+
}
|
|
619
|
+
}).timeout(attemptTimeout);
|
|
620
|
+
});
|
|
621
|
+
|
|
622
|
+
describe('#healthSummary - errors', () => {
|
|
623
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
624
|
+
try {
|
|
625
|
+
a.healthSummary(null, null, (data, error) => {
|
|
626
|
+
try {
|
|
627
|
+
if (stub) {
|
|
628
|
+
const displayE = 'Error 400 received on request';
|
|
629
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
630
|
+
} else {
|
|
631
|
+
runCommonAsserts(data, error);
|
|
632
|
+
}
|
|
633
|
+
saveMockData('ClusterManagement', 'healthSummary', 'default', data);
|
|
634
|
+
done();
|
|
635
|
+
} catch (err) {
|
|
636
|
+
log.error(`Test Failure: ${err}`);
|
|
637
|
+
done(err);
|
|
638
|
+
}
|
|
639
|
+
});
|
|
640
|
+
} catch (error) {
|
|
641
|
+
log.error(`Adapter Exception: ${error}`);
|
|
642
|
+
done(error);
|
|
643
|
+
}
|
|
644
|
+
}).timeout(attemptTimeout);
|
|
645
|
+
});
|
|
646
|
+
|
|
647
|
+
describe('#getConfiguredIPList - errors', () => {
|
|
648
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
649
|
+
try {
|
|
650
|
+
a.getConfiguredIPList('fakedata', null, (data, error) => {
|
|
651
|
+
try {
|
|
652
|
+
if (stub) {
|
|
653
|
+
const displayE = 'Error 400 received on request';
|
|
654
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
655
|
+
} else {
|
|
656
|
+
runCommonAsserts(data, error);
|
|
657
|
+
}
|
|
658
|
+
saveMockData('ClusterManagement', 'getConfiguredIPList', 'default', data);
|
|
659
|
+
done();
|
|
660
|
+
} catch (err) {
|
|
661
|
+
log.error(`Test Failure: ${err}`);
|
|
662
|
+
done(err);
|
|
663
|
+
}
|
|
664
|
+
});
|
|
665
|
+
} catch (error) {
|
|
666
|
+
log.error(`Adapter Exception: ${error}`);
|
|
667
|
+
done(error);
|
|
668
|
+
}
|
|
669
|
+
}).timeout(attemptTimeout);
|
|
670
|
+
});
|
|
671
|
+
|
|
672
|
+
describe('#isClusterReady - errors', () => {
|
|
673
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
674
|
+
try {
|
|
675
|
+
a.isClusterReady(null, (data, error) => {
|
|
676
|
+
try {
|
|
677
|
+
if (stub) {
|
|
678
|
+
const displayE = 'Error 400 received on request';
|
|
679
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
680
|
+
} else {
|
|
681
|
+
runCommonAsserts(data, error);
|
|
682
|
+
}
|
|
683
|
+
saveMockData('ClusterManagement', 'isClusterReady', 'default', data);
|
|
684
|
+
done();
|
|
685
|
+
} catch (err) {
|
|
686
|
+
log.error(`Test Failure: ${err}`);
|
|
687
|
+
done(err);
|
|
688
|
+
}
|
|
689
|
+
});
|
|
690
|
+
} catch (error) {
|
|
691
|
+
log.error(`Adapter Exception: ${error}`);
|
|
692
|
+
done(error);
|
|
693
|
+
}
|
|
694
|
+
}).timeout(attemptTimeout);
|
|
695
|
+
});
|
|
696
|
+
|
|
697
|
+
describe('#listVmanages - errors', () => {
|
|
698
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
699
|
+
try {
|
|
700
|
+
a.listVmanages(null, (data, error) => {
|
|
701
|
+
try {
|
|
702
|
+
if (stub) {
|
|
703
|
+
const displayE = 'Error 400 received on request';
|
|
704
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
705
|
+
} else {
|
|
706
|
+
runCommonAsserts(data, error);
|
|
707
|
+
}
|
|
708
|
+
saveMockData('ClusterManagement', 'listVmanages', 'default', data);
|
|
709
|
+
done();
|
|
710
|
+
} catch (err) {
|
|
711
|
+
log.error(`Test Failure: ${err}`);
|
|
712
|
+
done(err);
|
|
713
|
+
}
|
|
714
|
+
});
|
|
715
|
+
} catch (error) {
|
|
716
|
+
log.error(`Adapter Exception: ${error}`);
|
|
717
|
+
done(error);
|
|
718
|
+
}
|
|
719
|
+
}).timeout(attemptTimeout);
|
|
720
|
+
});
|
|
721
|
+
|
|
722
|
+
describe('#nodeProperties - errors', () => {
|
|
723
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
724
|
+
try {
|
|
725
|
+
a.nodeProperties(null, (data, error) => {
|
|
726
|
+
try {
|
|
727
|
+
if (stub) {
|
|
728
|
+
const displayE = 'Error 400 received on request';
|
|
729
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
730
|
+
} else {
|
|
731
|
+
runCommonAsserts(data, error);
|
|
732
|
+
}
|
|
733
|
+
saveMockData('ClusterManagement', 'nodeProperties', 'default', data);
|
|
734
|
+
done();
|
|
735
|
+
} catch (err) {
|
|
736
|
+
log.error(`Test Failure: ${err}`);
|
|
737
|
+
done(err);
|
|
738
|
+
}
|
|
739
|
+
});
|
|
740
|
+
} catch (error) {
|
|
741
|
+
log.error(`Adapter Exception: ${error}`);
|
|
742
|
+
done(error);
|
|
743
|
+
}
|
|
744
|
+
}).timeout(attemptTimeout);
|
|
745
|
+
});
|
|
746
|
+
|
|
747
|
+
const clusterManagementRemoveVmanageBodyParam = {};
|
|
748
|
+
describe('#removeVmanage - errors', () => {
|
|
749
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
750
|
+
try {
|
|
751
|
+
a.removeVmanage(clusterManagementRemoveVmanageBodyParam, null, (data, error) => {
|
|
752
|
+
try {
|
|
753
|
+
if (stub) {
|
|
754
|
+
const displayE = 'Error 400 received on request';
|
|
755
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
756
|
+
} else {
|
|
757
|
+
runCommonAsserts(data, error);
|
|
758
|
+
}
|
|
759
|
+
saveMockData('ClusterManagement', 'removeVmanage', 'default', data);
|
|
760
|
+
done();
|
|
761
|
+
} catch (err) {
|
|
762
|
+
log.error(`Test Failure: ${err}`);
|
|
763
|
+
done(err);
|
|
764
|
+
}
|
|
765
|
+
});
|
|
766
|
+
} catch (error) {
|
|
767
|
+
log.error(`Adapter Exception: ${error}`);
|
|
768
|
+
done(error);
|
|
769
|
+
}
|
|
770
|
+
}).timeout(attemptTimeout);
|
|
771
|
+
});
|
|
772
|
+
|
|
773
|
+
describe('#performReplicationAndRebalanceOfKafkaPartitions - errors', () => {
|
|
774
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
775
|
+
try {
|
|
776
|
+
a.performReplicationAndRebalanceOfKafkaPartitions(null, (data, error) => {
|
|
777
|
+
try {
|
|
778
|
+
if (stub) {
|
|
779
|
+
const displayE = 'Error 400 received on request';
|
|
780
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
781
|
+
} else {
|
|
782
|
+
runCommonAsserts(data, error);
|
|
783
|
+
}
|
|
784
|
+
saveMockData('ClusterManagement', 'performReplicationAndRebalanceOfKafkaPartitions', 'default', data);
|
|
785
|
+
done();
|
|
786
|
+
} catch (err) {
|
|
787
|
+
log.error(`Test Failure: ${err}`);
|
|
788
|
+
done(err);
|
|
789
|
+
}
|
|
790
|
+
});
|
|
791
|
+
} catch (error) {
|
|
792
|
+
log.error(`Adapter Exception: ${error}`);
|
|
793
|
+
done(error);
|
|
794
|
+
}
|
|
795
|
+
}).timeout(attemptTimeout);
|
|
796
|
+
});
|
|
797
|
+
|
|
798
|
+
const clusterManagementEditVmanageBodyParam = {};
|
|
799
|
+
describe('#editVmanage - errors', () => {
|
|
800
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
801
|
+
try {
|
|
802
|
+
a.editVmanage(clusterManagementEditVmanageBodyParam, null, (data, error) => {
|
|
803
|
+
try {
|
|
804
|
+
if (stub) {
|
|
805
|
+
const displayE = 'Error 400 received on request';
|
|
806
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
807
|
+
} else {
|
|
808
|
+
runCommonAsserts(data, error);
|
|
809
|
+
}
|
|
810
|
+
saveMockData('ClusterManagement', 'editVmanage', 'default', data);
|
|
811
|
+
done();
|
|
812
|
+
} catch (err) {
|
|
813
|
+
log.error(`Test Failure: ${err}`);
|
|
814
|
+
done(err);
|
|
815
|
+
}
|
|
816
|
+
});
|
|
817
|
+
} catch (error) {
|
|
818
|
+
log.error(`Adapter Exception: ${error}`);
|
|
819
|
+
done(error);
|
|
820
|
+
}
|
|
821
|
+
}).timeout(attemptTimeout);
|
|
822
|
+
});
|
|
823
|
+
|
|
824
|
+
const clusterManagementAddVmanageBodyParam = {};
|
|
825
|
+
describe('#addVmanage - errors', () => {
|
|
826
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
827
|
+
try {
|
|
828
|
+
a.addVmanage(clusterManagementAddVmanageBodyParam, null, (data, error) => {
|
|
829
|
+
try {
|
|
830
|
+
if (stub) {
|
|
831
|
+
const displayE = 'Error 400 received on request';
|
|
832
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
833
|
+
} else {
|
|
834
|
+
runCommonAsserts(data, error);
|
|
835
|
+
}
|
|
836
|
+
saveMockData('ClusterManagement', 'addVmanage', 'default', data);
|
|
837
|
+
done();
|
|
838
|
+
} catch (err) {
|
|
839
|
+
log.error(`Test Failure: ${err}`);
|
|
840
|
+
done(err);
|
|
841
|
+
}
|
|
842
|
+
});
|
|
843
|
+
} catch (error) {
|
|
844
|
+
log.error(`Adapter Exception: ${error}`);
|
|
845
|
+
done(error);
|
|
846
|
+
}
|
|
847
|
+
}).timeout(attemptTimeout);
|
|
848
|
+
});
|
|
849
|
+
|
|
850
|
+
describe('#getTenancyMode - errors', () => {
|
|
851
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
852
|
+
try {
|
|
853
|
+
a.getTenancyMode(null, (data, error) => {
|
|
854
|
+
try {
|
|
855
|
+
if (stub) {
|
|
856
|
+
const displayE = 'Error 400 received on request';
|
|
857
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
858
|
+
} else {
|
|
859
|
+
runCommonAsserts(data, error);
|
|
860
|
+
}
|
|
861
|
+
saveMockData('ClusterManagement', 'getTenancyMode', 'default', data);
|
|
862
|
+
done();
|
|
863
|
+
} catch (err) {
|
|
864
|
+
log.error(`Test Failure: ${err}`);
|
|
865
|
+
done(err);
|
|
866
|
+
}
|
|
867
|
+
});
|
|
868
|
+
} catch (error) {
|
|
869
|
+
log.error(`Adapter Exception: ${error}`);
|
|
870
|
+
done(error);
|
|
871
|
+
}
|
|
872
|
+
}).timeout(attemptTimeout);
|
|
873
|
+
});
|
|
874
|
+
|
|
875
|
+
const clusterManagementSetTenancyModeBodyParam = {};
|
|
876
|
+
describe('#setTenancyMode - errors', () => {
|
|
877
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
878
|
+
try {
|
|
879
|
+
a.setTenancyMode(clusterManagementSetTenancyModeBodyParam, null, (data, error) => {
|
|
880
|
+
try {
|
|
881
|
+
if (stub) {
|
|
882
|
+
const displayE = 'Error 400 received on request';
|
|
883
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
884
|
+
} else {
|
|
885
|
+
runCommonAsserts(data, error);
|
|
886
|
+
}
|
|
887
|
+
saveMockData('ClusterManagement', 'setTenancyMode', 'default', data);
|
|
888
|
+
done();
|
|
889
|
+
} catch (err) {
|
|
890
|
+
log.error(`Test Failure: ${err}`);
|
|
891
|
+
done(err);
|
|
892
|
+
}
|
|
893
|
+
});
|
|
894
|
+
} catch (error) {
|
|
895
|
+
log.error(`Adapter Exception: ${error}`);
|
|
896
|
+
done(error);
|
|
897
|
+
}
|
|
898
|
+
}).timeout(attemptTimeout);
|
|
899
|
+
});
|
|
900
|
+
|
|
901
|
+
describe('#getTenantsList - errors', () => {
|
|
902
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
903
|
+
try {
|
|
904
|
+
a.getTenantsList(null, (data, error) => {
|
|
905
|
+
try {
|
|
906
|
+
if (stub) {
|
|
907
|
+
const displayE = 'Error 400 received on request';
|
|
908
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
909
|
+
} else {
|
|
910
|
+
runCommonAsserts(data, error);
|
|
911
|
+
}
|
|
912
|
+
saveMockData('ClusterManagement', 'getTenantsList', 'default', data);
|
|
913
|
+
done();
|
|
914
|
+
} catch (err) {
|
|
915
|
+
log.error(`Test Failure: ${err}`);
|
|
916
|
+
done(err);
|
|
917
|
+
}
|
|
918
|
+
});
|
|
919
|
+
} catch (error) {
|
|
920
|
+
log.error(`Adapter Exception: ${error}`);
|
|
921
|
+
done(error);
|
|
922
|
+
}
|
|
923
|
+
}).timeout(attemptTimeout);
|
|
924
|
+
});
|
|
925
|
+
|
|
926
|
+
const clusterManagementAddOrUpdateUserCredentialsBodyParam = {};
|
|
927
|
+
describe('#addOrUpdateUserCredentials - errors', () => {
|
|
928
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
929
|
+
try {
|
|
930
|
+
a.addOrUpdateUserCredentials(clusterManagementAddOrUpdateUserCredentialsBodyParam, null, (data, error) => {
|
|
931
|
+
try {
|
|
932
|
+
if (stub) {
|
|
933
|
+
const displayE = 'Error 400 received on request';
|
|
934
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
935
|
+
} else {
|
|
936
|
+
runCommonAsserts(data, error);
|
|
937
|
+
}
|
|
938
|
+
saveMockData('ClusterManagement', 'addOrUpdateUserCredentials', 'default', data);
|
|
939
|
+
done();
|
|
940
|
+
} catch (err) {
|
|
941
|
+
log.error(`Test Failure: ${err}`);
|
|
942
|
+
done(err);
|
|
943
|
+
}
|
|
944
|
+
});
|
|
945
|
+
} catch (error) {
|
|
946
|
+
log.error(`Adapter Exception: ${error}`);
|
|
947
|
+
done(error);
|
|
948
|
+
}
|
|
949
|
+
}).timeout(attemptTimeout);
|
|
950
|
+
});
|
|
951
|
+
|
|
952
|
+
describe('#getVManageDetails - errors', () => {
|
|
953
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
954
|
+
try {
|
|
955
|
+
a.getVManageDetails('fakedata', null, (data, error) => {
|
|
956
|
+
try {
|
|
957
|
+
if (stub) {
|
|
958
|
+
const displayE = 'Error 400 received on request';
|
|
959
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
960
|
+
} else {
|
|
961
|
+
runCommonAsserts(data, error);
|
|
962
|
+
}
|
|
963
|
+
saveMockData('ClusterManagement', 'getVManageDetails', 'default', data);
|
|
964
|
+
done();
|
|
965
|
+
} catch (err) {
|
|
966
|
+
log.error(`Test Failure: ${err}`);
|
|
967
|
+
done(err);
|
|
968
|
+
}
|
|
969
|
+
});
|
|
970
|
+
} catch (error) {
|
|
971
|
+
log.error(`Adapter Exception: ${error}`);
|
|
972
|
+
done(error);
|
|
973
|
+
}
|
|
974
|
+
}).timeout(attemptTimeout);
|
|
975
|
+
});
|
|
976
|
+
|
|
977
|
+
describe('#getConnectedDevicesPerTenant - errors', () => {
|
|
978
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
979
|
+
try {
|
|
980
|
+
a.getConnectedDevicesPerTenant('fakedata', 'fakedata', null, (data, error) => {
|
|
981
|
+
try {
|
|
982
|
+
if (stub) {
|
|
983
|
+
const displayE = 'Error 400 received on request';
|
|
984
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-rubrik-connectorRest-handleEndResponse', displayE);
|
|
985
|
+
} else {
|
|
986
|
+
runCommonAsserts(data, error);
|
|
987
|
+
}
|
|
988
|
+
saveMockData('ClusterManagement', 'getConnectedDevicesPerTenant', 'default', data);
|
|
989
|
+
done();
|
|
990
|
+
} catch (err) {
|
|
991
|
+
log.error(`Test Failure: ${err}`);
|
|
992
|
+
done(err);
|
|
993
|
+
}
|
|
994
|
+
});
|
|
995
|
+
} catch (error) {
|
|
996
|
+
log.error(`Adapter Exception: ${error}`);
|
|
997
|
+
done(error);
|
|
998
|
+
}
|
|
999
|
+
}).timeout(attemptTimeout);
|
|
1000
|
+
});
|
|
470
1001
|
});
|
|
471
1002
|
});
|