@itentialopensource/adapter-zscaler 0.8.2 → 0.9.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.
Files changed (125) hide show
  1. package/CALLS.md +1116 -0
  2. package/CHANGELOG.md +16 -0
  3. package/TAB1.md +5 -0
  4. package/TAB2.md +1732 -0
  5. package/adapter.js +17190 -0
  6. package/entities/AdminRoleManagement/action.json +126 -0
  7. package/entities/AdminRoleManagement/schema.json +24 -0
  8. package/entities/AppViews/action.json +46 -0
  9. package/entities/AppViews/mockdatafiles/getViewApps-default.json +40 -0
  10. package/entities/AppViews/mockdatafiles/getViews-default.json +16 -0
  11. package/entities/AppViews/schema.json +20 -0
  12. package/entities/Applications/action.json +66 -0
  13. package/entities/Applications/mockdatafiles/appsSearchGET-default.json +186 -0
  14. package/entities/Applications/schema.json +21 -0
  15. package/entities/BrowserIsolation/action.json +25 -0
  16. package/entities/BrowserIsolation/mockdatafiles/getCloudBrowserIsolationProfiles-default.json +20 -0
  17. package/entities/BrowserIsolation/schema.json +19 -0
  18. package/entities/DataLossPrevention/action.json +767 -0
  19. package/entities/DataLossPrevention/mockdatafiles/getDLPDictionarySummary-default.json +808 -0
  20. package/entities/DataLossPrevention/mockdatafiles/getDLPEngines-default.json +26 -0
  21. package/entities/DataLossPrevention/mockdatafiles/getDLPEnginesSummary-default.json +18 -0
  22. package/entities/DataLossPrevention/mockdatafiles/getDlpDictionaries-default.json +402 -0
  23. package/entities/DataLossPrevention/mockdatafiles/getICAPServerSummary-default.json +14 -0
  24. package/entities/DataLossPrevention/mockdatafiles/getICAPServers-default.json +20 -0
  25. package/entities/DataLossPrevention/mockdatafiles/getIncidentReceiverServerSummary-default.json +30 -0
  26. package/entities/DataLossPrevention/mockdatafiles/getIncidentReceiverServers-default.json +30 -0
  27. package/entities/DataLossPrevention/mockdatafiles/getPredefinedHierarchicalIdentifiersByDictionaryId-default.json +4 -0
  28. package/entities/DataLossPrevention/mockdatafiles/getProfiles-default.json +94 -0
  29. package/entities/DataLossPrevention/mockdatafiles/getRules-default.json +5556 -0
  30. package/entities/DataLossPrevention/mockdatafiles/getSchemaLite-default.json +52 -0
  31. package/entities/DataLossPrevention/mockdatafiles/getSchemas-default.json +379 -0
  32. package/entities/DataLossPrevention/mockdatafiles/getSummary-default.json +56 -0
  33. package/entities/DataLossPrevention/mockdatafiles/getWebDlpRulesLite-default.json +5758 -0
  34. package/entities/DataLossPrevention/mockdatafiles/gettemplates-default.json +34 -0
  35. package/entities/DataLossPrevention/schema.json +55 -0
  36. package/entities/DeviceGroups/action.json +67 -0
  37. package/entities/DeviceGroups/mockdatafiles/getDeviceGroups-default.json +20 -0
  38. package/entities/DeviceGroups/mockdatafiles/getDevices-default.json +26 -0
  39. package/entities/DeviceGroups/mockdatafiles/getDevicesLite-default.json +38 -0
  40. package/entities/DeviceGroups/schema.json +21 -0
  41. package/entities/EventLogs/action.json +86 -0
  42. package/entities/EventLogs/schema.json +22 -0
  43. package/entities/FirewallPolicies/action.json +889 -0
  44. package/entities/FirewallPolicies/mockdatafiles/getDestinationIpGroups-default.json +130 -0
  45. package/entities/FirewallPolicies/mockdatafiles/getDestinationIpGroupsLite-default.json +94 -0
  46. package/entities/FirewallPolicies/mockdatafiles/getDestinationIpv6Groups-default.json +111 -0
  47. package/entities/FirewallPolicies/mockdatafiles/getDestinationIpv6GroupsLite-default.json +20 -0
  48. package/entities/FirewallPolicies/mockdatafiles/getFirewallFilteringRules-default.json +3884 -0
  49. package/entities/FirewallPolicies/mockdatafiles/getNetowrkApplicationGroups-default.json +21 -0
  50. package/entities/FirewallPolicies/mockdatafiles/getNetowrkApplicationGroupsLite-default.json +49 -0
  51. package/entities/FirewallPolicies/mockdatafiles/getNetworkApplications-default.json +20 -0
  52. package/entities/FirewallPolicies/mockdatafiles/getNetworkServiceGroups-default.json +657 -0
  53. package/entities/FirewallPolicies/mockdatafiles/getNetworkServiceGroupsLite-default.json +361 -0
  54. package/entities/FirewallPolicies/mockdatafiles/getNetworkServices-default.json +206 -0
  55. package/entities/FirewallPolicies/mockdatafiles/getNetworkServicesLite-default.json +322 -0
  56. package/entities/FirewallPolicies/mockdatafiles/getSourceIpGroups-default.json +57 -0
  57. package/entities/FirewallPolicies/mockdatafiles/getSourceIpGroupsLite-default.json +17 -0
  58. package/entities/FirewallPolicies/mockdatafiles/getSourceIpv6Groups-default.json +54 -0
  59. package/entities/FirewallPolicies/mockdatafiles/getSourceIpv6GroupsLite-default.json +15 -0
  60. package/entities/FirewallPolicies/mockdatafiles/getTimeWindowSummary-default.json +42 -0
  61. package/entities/FirewallPolicies/mockdatafiles/getTimeWindows-default.json +32 -0
  62. package/entities/FirewallPolicies/schema.json +61 -0
  63. package/entities/ForwardingControlPolicy/action.json +208 -0
  64. package/entities/ForwardingControlPolicy/mockdatafiles/getForwardingRules-default.json +2183 -0
  65. package/entities/ForwardingControlPolicy/mockdatafiles/getZpaGateways-default.json +60 -0
  66. package/entities/ForwardingControlPolicy/schema.json +28 -0
  67. package/entities/IntermediateCACertificates/action.json +455 -0
  68. package/entities/IntermediateCACertificates/mockdatafiles/getCertificatesInReadyToUseState-default.json +70 -0
  69. package/entities/IntermediateCACertificates/mockdatafiles/getIntermediateCaCertificates-default.json +19 -0
  70. package/entities/IntermediateCACertificates/mockdatafiles/getIntermediateCaCertificatesLite-default.json +53 -0
  71. package/entities/IntermediateCACertificates/schema.json +40 -0
  72. package/entities/IoTReport/action.json +88 -0
  73. package/entities/IoTReport/mockdatafiles/getCategories-default.json +22 -0
  74. package/entities/IoTReport/mockdatafiles/getClassifications-default.json +12 -0
  75. package/entities/IoTReport/mockdatafiles/getDeviceTypes-default.json +7 -0
  76. package/entities/IoTReport/schema.json +22 -0
  77. package/entities/LocationManagement/action.json +130 -0
  78. package/entities/LocationManagement/mockdatafiles/getGroups-default.json +372 -0
  79. package/entities/LocationManagement/mockdatafiles/getGroups__v1-default.json +372 -0
  80. package/entities/LocationManagement/mockdatafiles/getGroups__v2-default.json +372 -0
  81. package/entities/LocationManagement/mockdatafiles/getSubLocations-default.json +465 -0
  82. package/entities/LocationManagement/mockdatafiles/getTopLocations-default.json +191 -0
  83. package/entities/LocationManagement/schema.json +24 -0
  84. package/entities/RuleLabels/action.json +106 -0
  85. package/entities/RuleLabels/mockdatafiles/getRuleLabels-default.json +59 -0
  86. package/entities/RuleLabels/schema.json +23 -0
  87. package/entities/SandboxSettings/action.json +66 -0
  88. package/entities/SandboxSettings/schema.json +21 -0
  89. package/entities/SandboxSubmissionAPI/action.json +44 -0
  90. package/entities/SandboxSubmissionAPI/schema.json +20 -0
  91. package/entities/ShadowITReport/action.json +106 -0
  92. package/entities/ShadowITReport/mockdatafiles/getAllCustomTags-default.json +10 -0
  93. package/entities/ShadowITReport/mockdatafiles/getCloudApplicationsLite-default.json +10 -0
  94. package/entities/ShadowITReport/schema.json +23 -0
  95. package/entities/TrafficForwarding/action.json +459 -0
  96. package/entities/TrafficForwarding/mockdatafiles/getAllGreTunnels-default.json +70 -0
  97. package/entities/TrafficForwarding/mockdatafiles/getAllStaticIPs-default.json +90 -0
  98. package/entities/TrafficForwarding/mockdatafiles/getDns64Prefixes-default.json +34 -0
  99. package/entities/TrafficForwarding/mockdatafiles/getIPGWDetails-default.json +32 -0
  100. package/entities/TrafficForwarding/mockdatafiles/getNat64Prefixes-default.json +18 -0
  101. package/entities/TrafficForwarding/mockdatafiles/getRecommendedGreVips-default.json +20 -0
  102. package/entities/TrafficForwarding/mockdatafiles/getRecommendedVipsGroupedByDC-default.json +82 -0
  103. package/entities/TrafficForwarding/mockdatafiles/getRegionsByPrefix-default.json +26 -0
  104. package/entities/TrafficForwarding/mockdatafiles/getVpnCredentials-default.json +82 -0
  105. package/entities/TrafficForwarding/mockdatafiles/getVpnCredentials__v1-default.json +82 -0
  106. package/entities/TrafficForwarding/mockdatafiles/getVpnCredentials__v2-default.json +82 -0
  107. package/entities/TrafficForwarding/mockdatafiles/getZscalerNodesDetails-default.json +170 -0
  108. package/entities/TrafficForwarding/mockdatafiles/validateAndGetAvailableInternalIpRanges-default.json +18 -0
  109. package/entities/TrafficForwarding/schema.json +40 -0
  110. package/entities/URLFilteringPolicies/action.json +106 -0
  111. package/entities/URLFilteringPolicies/mockdatafiles/getUrlFilteringRules-default.json +2918 -0
  112. package/entities/URLFilteringPolicies/schema.json +23 -0
  113. package/entities/UserAuthenticationSettings/action.json +45 -0
  114. package/entities/UserAuthenticationSettings/schema.json +20 -0
  115. package/entities/WorkloadGroups/action.json +25 -0
  116. package/entities/WorkloadGroups/mockdatafiles/getWorkloadGroups-default.json +396 -0
  117. package/entities/WorkloadGroups/schema.json +19 -0
  118. package/package.json +3 -3
  119. package/pronghorn.json +17256 -0
  120. package/refs?service=git-upload-pack +0 -0
  121. package/report/adapter-openapi.json +17120 -2
  122. package/report/adapter-openapi.yaml +13753 -815
  123. package/report/adapterInfo.json +7 -7
  124. package/test/integration/adapterTestIntegration.js +4882 -0
  125. package/test/unit/adapterTestUnit.js +3848 -1
@@ -316,7 +316,7 @@ describe('[unit] Zscaler Adapter Test', () => {
316
316
  assert.notEqual(null, packageDotJson.dependencies);
317
317
  assert.notEqual('', packageDotJson.dependencies);
318
318
  assert.equal('^8.12.0', packageDotJson.dependencies.ajv);
319
- assert.equal('^1.6.7', packageDotJson.dependencies.axios);
319
+ assert.equal('^1.6.8', packageDotJson.dependencies.axios);
320
320
  assert.equal('^11.0.0', packageDotJson.dependencies.commander);
321
321
  assert.equal('^11.1.1', packageDotJson.dependencies['fs-extra']);
322
322
  assert.equal('^10.3.0', packageDotJson.dependencies.mocha);
@@ -2494,5 +2494,3852 @@ describe('[unit] Zscaler Adapter Test', () => {
2494
2494
  }
2495
2495
  }).timeout(attemptTimeout);
2496
2496
  });
2497
+
2498
+ describe('#submitFile - errors', () => {
2499
+ it('should have a submitFile function', (done) => {
2500
+ try {
2501
+ assert.equal(true, typeof a.submitFile === 'function');
2502
+ done();
2503
+ } catch (error) {
2504
+ log.error(`Test Failure: ${error}`);
2505
+ done(error);
2506
+ }
2507
+ }).timeout(attemptTimeout);
2508
+ it('should error if - missing apiToken', (done) => {
2509
+ try {
2510
+ a.submitFile(null, null, (data, error) => {
2511
+ try {
2512
+ const displayE = 'apiToken is required';
2513
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-submitFile', displayE);
2514
+ done();
2515
+ } catch (err) {
2516
+ log.error(`Test Failure: ${err}`);
2517
+ done(err);
2518
+ }
2519
+ });
2520
+ } catch (error) {
2521
+ log.error(`Adapter Exception: ${error}`);
2522
+ done(error);
2523
+ }
2524
+ }).timeout(attemptTimeout);
2525
+ });
2526
+
2527
+ describe('#submitFileForScan - errors', () => {
2528
+ it('should have a submitFileForScan function', (done) => {
2529
+ try {
2530
+ assert.equal(true, typeof a.submitFileForScan === 'function');
2531
+ done();
2532
+ } catch (error) {
2533
+ log.error(`Test Failure: ${error}`);
2534
+ done(error);
2535
+ }
2536
+ }).timeout(attemptTimeout);
2537
+ it('should error if - missing apiToken', (done) => {
2538
+ try {
2539
+ a.submitFileForScan(null, (data, error) => {
2540
+ try {
2541
+ const displayE = 'apiToken is required';
2542
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-submitFileForScan', displayE);
2543
+ done();
2544
+ } catch (err) {
2545
+ log.error(`Test Failure: ${err}`);
2546
+ done(err);
2547
+ }
2548
+ });
2549
+ } catch (error) {
2550
+ log.error(`Adapter Exception: ${error}`);
2551
+ done(error);
2552
+ }
2553
+ }).timeout(attemptTimeout);
2554
+ });
2555
+
2556
+ describe('#getApp - errors', () => {
2557
+ it('should have a getApp function', (done) => {
2558
+ try {
2559
+ assert.equal(true, typeof a.getApp === 'function');
2560
+ done();
2561
+ } catch (error) {
2562
+ log.error(`Test Failure: ${error}`);
2563
+ done(error);
2564
+ }
2565
+ }).timeout(attemptTimeout);
2566
+ });
2567
+
2568
+ describe('#postApp - errors', () => {
2569
+ it('should have a postApp function', (done) => {
2570
+ try {
2571
+ assert.equal(true, typeof a.postApp === 'function');
2572
+ done();
2573
+ } catch (error) {
2574
+ log.error(`Test Failure: ${error}`);
2575
+ done(error);
2576
+ }
2577
+ }).timeout(attemptTimeout);
2578
+ it('should error if - missing body', (done) => {
2579
+ try {
2580
+ a.postApp(null, (data, error) => {
2581
+ try {
2582
+ const displayE = 'body is required';
2583
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-postApp', displayE);
2584
+ done();
2585
+ } catch (err) {
2586
+ log.error(`Test Failure: ${err}`);
2587
+ done(err);
2588
+ }
2589
+ });
2590
+ } catch (error) {
2591
+ log.error(`Adapter Exception: ${error}`);
2592
+ done(error);
2593
+ }
2594
+ }).timeout(attemptTimeout);
2595
+ });
2596
+
2597
+ describe('#appsSearchGET - errors', () => {
2598
+ it('should have a appsSearchGET function', (done) => {
2599
+ try {
2600
+ assert.equal(true, typeof a.appsSearchGET === 'function');
2601
+ done();
2602
+ } catch (error) {
2603
+ log.error(`Test Failure: ${error}`);
2604
+ done(error);
2605
+ }
2606
+ }).timeout(attemptTimeout);
2607
+ it('should error if - missing appName', (done) => {
2608
+ try {
2609
+ a.appsSearchGET(null, null, null, (data, error) => {
2610
+ try {
2611
+ const displayE = 'appName is required';
2612
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-appsSearchGET', displayE);
2613
+ done();
2614
+ } catch (err) {
2615
+ log.error(`Test Failure: ${err}`);
2616
+ done(err);
2617
+ }
2618
+ });
2619
+ } catch (error) {
2620
+ log.error(`Adapter Exception: ${error}`);
2621
+ done(error);
2622
+ }
2623
+ }).timeout(attemptTimeout);
2624
+ });
2625
+
2626
+ describe('#getViews - errors', () => {
2627
+ it('should have a getViews function', (done) => {
2628
+ try {
2629
+ assert.equal(true, typeof a.getViews === 'function');
2630
+ done();
2631
+ } catch (error) {
2632
+ log.error(`Test Failure: ${error}`);
2633
+ done(error);
2634
+ }
2635
+ }).timeout(attemptTimeout);
2636
+ });
2637
+
2638
+ describe('#getViewApps - errors', () => {
2639
+ it('should have a getViewApps function', (done) => {
2640
+ try {
2641
+ assert.equal(true, typeof a.getViewApps === 'function');
2642
+ done();
2643
+ } catch (error) {
2644
+ log.error(`Test Failure: ${error}`);
2645
+ done(error);
2646
+ }
2647
+ }).timeout(attemptTimeout);
2648
+ it('should error if - missing appViewId', (done) => {
2649
+ try {
2650
+ a.getViewApps(null, (data, error) => {
2651
+ try {
2652
+ const displayE = 'appViewId is required';
2653
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getViewApps', displayE);
2654
+ done();
2655
+ } catch (err) {
2656
+ log.error(`Test Failure: ${err}`);
2657
+ done(err);
2658
+ }
2659
+ });
2660
+ } catch (error) {
2661
+ log.error(`Adapter Exception: ${error}`);
2662
+ done(error);
2663
+ }
2664
+ }).timeout(attemptTimeout);
2665
+ });
2666
+
2667
+ describe('#getRoleSummary - errors', () => {
2668
+ it('should have a getRoleSummary function', (done) => {
2669
+ try {
2670
+ assert.equal(true, typeof a.getRoleSummary === 'function');
2671
+ done();
2672
+ } catch (error) {
2673
+ log.error(`Test Failure: ${error}`);
2674
+ done(error);
2675
+ }
2676
+ }).timeout(attemptTimeout);
2677
+ });
2678
+
2679
+ describe('#getAdminUsers - errors', () => {
2680
+ it('should have a getAdminUsers function', (done) => {
2681
+ try {
2682
+ assert.equal(true, typeof a.getAdminUsers === 'function');
2683
+ done();
2684
+ } catch (error) {
2685
+ log.error(`Test Failure: ${error}`);
2686
+ done(error);
2687
+ }
2688
+ }).timeout(attemptTimeout);
2689
+ });
2690
+
2691
+ describe('#addAdminUser - errors', () => {
2692
+ it('should have a addAdminUser function', (done) => {
2693
+ try {
2694
+ assert.equal(true, typeof a.addAdminUser === 'function');
2695
+ done();
2696
+ } catch (error) {
2697
+ log.error(`Test Failure: ${error}`);
2698
+ done(error);
2699
+ }
2700
+ }).timeout(attemptTimeout);
2701
+ });
2702
+
2703
+ describe('#updateAdminUser - errors', () => {
2704
+ it('should have a updateAdminUser function', (done) => {
2705
+ try {
2706
+ assert.equal(true, typeof a.updateAdminUser === 'function');
2707
+ done();
2708
+ } catch (error) {
2709
+ log.error(`Test Failure: ${error}`);
2710
+ done(error);
2711
+ }
2712
+ }).timeout(attemptTimeout);
2713
+ it('should error if - missing userId', (done) => {
2714
+ try {
2715
+ a.updateAdminUser(null, (data, error) => {
2716
+ try {
2717
+ const displayE = 'userId is required';
2718
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-updateAdminUser', displayE);
2719
+ done();
2720
+ } catch (err) {
2721
+ log.error(`Test Failure: ${err}`);
2722
+ done(err);
2723
+ }
2724
+ });
2725
+ } catch (error) {
2726
+ log.error(`Adapter Exception: ${error}`);
2727
+ done(error);
2728
+ }
2729
+ }).timeout(attemptTimeout);
2730
+ });
2731
+
2732
+ describe('#deleteAdminUser - errors', () => {
2733
+ it('should have a deleteAdminUser function', (done) => {
2734
+ try {
2735
+ assert.equal(true, typeof a.deleteAdminUser === 'function');
2736
+ done();
2737
+ } catch (error) {
2738
+ log.error(`Test Failure: ${error}`);
2739
+ done(error);
2740
+ }
2741
+ }).timeout(attemptTimeout);
2742
+ it('should error if - missing userId', (done) => {
2743
+ try {
2744
+ a.deleteAdminUser(null, (data, error) => {
2745
+ try {
2746
+ const displayE = 'userId is required';
2747
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-deleteAdminUser', displayE);
2748
+ done();
2749
+ } catch (err) {
2750
+ log.error(`Test Failure: ${err}`);
2751
+ done(err);
2752
+ }
2753
+ });
2754
+ } catch (error) {
2755
+ log.error(`Adapter Exception: ${error}`);
2756
+ done(error);
2757
+ }
2758
+ }).timeout(attemptTimeout);
2759
+ });
2760
+
2761
+ describe('#convertAdminToEndUser - errors', () => {
2762
+ it('should have a convertAdminToEndUser function', (done) => {
2763
+ try {
2764
+ assert.equal(true, typeof a.convertAdminToEndUser === 'function');
2765
+ done();
2766
+ } catch (error) {
2767
+ log.error(`Test Failure: ${error}`);
2768
+ done(error);
2769
+ }
2770
+ }).timeout(attemptTimeout);
2771
+ it('should error if - missing userId', (done) => {
2772
+ try {
2773
+ a.convertAdminToEndUser(null, null, (data, error) => {
2774
+ try {
2775
+ const displayE = 'userId is required';
2776
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-convertAdminToEndUser', displayE);
2777
+ done();
2778
+ } catch (err) {
2779
+ log.error(`Test Failure: ${err}`);
2780
+ done(err);
2781
+ }
2782
+ });
2783
+ } catch (error) {
2784
+ log.error(`Adapter Exception: ${error}`);
2785
+ done(error);
2786
+ }
2787
+ }).timeout(attemptTimeout);
2788
+ });
2789
+
2790
+ describe('#getCloudBrowserIsolationProfiles - errors', () => {
2791
+ it('should have a getCloudBrowserIsolationProfiles function', (done) => {
2792
+ try {
2793
+ assert.equal(true, typeof a.getCloudBrowserIsolationProfiles === 'function');
2794
+ done();
2795
+ } catch (error) {
2796
+ log.error(`Test Failure: ${error}`);
2797
+ done(error);
2798
+ }
2799
+ }).timeout(attemptTimeout);
2800
+ });
2801
+
2802
+ describe('#getDlpDictionaries - errors', () => {
2803
+ it('should have a getDlpDictionaries function', (done) => {
2804
+ try {
2805
+ assert.equal(true, typeof a.getDlpDictionaries === 'function');
2806
+ done();
2807
+ } catch (error) {
2808
+ log.error(`Test Failure: ${error}`);
2809
+ done(error);
2810
+ }
2811
+ }).timeout(attemptTimeout);
2812
+ });
2813
+
2814
+ describe('#addCustomDLPDictionary - errors', () => {
2815
+ it('should have a addCustomDLPDictionary function', (done) => {
2816
+ try {
2817
+ assert.equal(true, typeof a.addCustomDLPDictionary === 'function');
2818
+ done();
2819
+ } catch (error) {
2820
+ log.error(`Test Failure: ${error}`);
2821
+ done(error);
2822
+ }
2823
+ }).timeout(attemptTimeout);
2824
+ });
2825
+
2826
+ describe('#getDLPDictionarySummary - errors', () => {
2827
+ it('should have a getDLPDictionarySummary function', (done) => {
2828
+ try {
2829
+ assert.equal(true, typeof a.getDLPDictionarySummary === 'function');
2830
+ done();
2831
+ } catch (error) {
2832
+ log.error(`Test Failure: ${error}`);
2833
+ done(error);
2834
+ }
2835
+ }).timeout(attemptTimeout);
2836
+ });
2837
+
2838
+ describe('#getDlpDictionaryById - errors', () => {
2839
+ it('should have a getDlpDictionaryById function', (done) => {
2840
+ try {
2841
+ assert.equal(true, typeof a.getDlpDictionaryById === 'function');
2842
+ done();
2843
+ } catch (error) {
2844
+ log.error(`Test Failure: ${error}`);
2845
+ done(error);
2846
+ }
2847
+ }).timeout(attemptTimeout);
2848
+ it('should error if - missing dlpDictId', (done) => {
2849
+ try {
2850
+ a.getDlpDictionaryById(null, (data, error) => {
2851
+ try {
2852
+ const displayE = 'dlpDictId is required';
2853
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getDlpDictionaryById', displayE);
2854
+ done();
2855
+ } catch (err) {
2856
+ log.error(`Test Failure: ${err}`);
2857
+ done(err);
2858
+ }
2859
+ });
2860
+ } catch (error) {
2861
+ log.error(`Adapter Exception: ${error}`);
2862
+ done(error);
2863
+ }
2864
+ }).timeout(attemptTimeout);
2865
+ });
2866
+
2867
+ describe('#updateDlpDictionary - errors', () => {
2868
+ it('should have a updateDlpDictionary function', (done) => {
2869
+ try {
2870
+ assert.equal(true, typeof a.updateDlpDictionary === 'function');
2871
+ done();
2872
+ } catch (error) {
2873
+ log.error(`Test Failure: ${error}`);
2874
+ done(error);
2875
+ }
2876
+ }).timeout(attemptTimeout);
2877
+ it('should error if - missing dlpDictId', (done) => {
2878
+ try {
2879
+ a.updateDlpDictionary(null, null, (data, error) => {
2880
+ try {
2881
+ const displayE = 'dlpDictId is required';
2882
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-updateDlpDictionary', displayE);
2883
+ done();
2884
+ } catch (err) {
2885
+ log.error(`Test Failure: ${err}`);
2886
+ done(err);
2887
+ }
2888
+ });
2889
+ } catch (error) {
2890
+ log.error(`Adapter Exception: ${error}`);
2891
+ done(error);
2892
+ }
2893
+ }).timeout(attemptTimeout);
2894
+ });
2895
+
2896
+ describe('#deleteCustomDlpDictionary - errors', () => {
2897
+ it('should have a deleteCustomDlpDictionary function', (done) => {
2898
+ try {
2899
+ assert.equal(true, typeof a.deleteCustomDlpDictionary === 'function');
2900
+ done();
2901
+ } catch (error) {
2902
+ log.error(`Test Failure: ${error}`);
2903
+ done(error);
2904
+ }
2905
+ }).timeout(attemptTimeout);
2906
+ it('should error if - missing dlpDictId', (done) => {
2907
+ try {
2908
+ a.deleteCustomDlpDictionary(null, (data, error) => {
2909
+ try {
2910
+ const displayE = 'dlpDictId is required';
2911
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-deleteCustomDlpDictionary', displayE);
2912
+ done();
2913
+ } catch (err) {
2914
+ log.error(`Test Failure: ${err}`);
2915
+ done(err);
2916
+ }
2917
+ });
2918
+ } catch (error) {
2919
+ log.error(`Adapter Exception: ${error}`);
2920
+ done(error);
2921
+ }
2922
+ }).timeout(attemptTimeout);
2923
+ });
2924
+
2925
+ describe('#getPredefinedHierarchicalIdentifiersByDictionaryId - errors', () => {
2926
+ it('should have a getPredefinedHierarchicalIdentifiersByDictionaryId function', (done) => {
2927
+ try {
2928
+ assert.equal(true, typeof a.getPredefinedHierarchicalIdentifiersByDictionaryId === 'function');
2929
+ done();
2930
+ } catch (error) {
2931
+ log.error(`Test Failure: ${error}`);
2932
+ done(error);
2933
+ }
2934
+ }).timeout(attemptTimeout);
2935
+ it('should error if - missing dictId', (done) => {
2936
+ try {
2937
+ a.getPredefinedHierarchicalIdentifiersByDictionaryId(null, (data, error) => {
2938
+ try {
2939
+ const displayE = 'dictId is required';
2940
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getPredefinedHierarchicalIdentifiersByDictionaryId', displayE);
2941
+ done();
2942
+ } catch (err) {
2943
+ log.error(`Test Failure: ${err}`);
2944
+ done(err);
2945
+ }
2946
+ });
2947
+ } catch (error) {
2948
+ log.error(`Adapter Exception: ${error}`);
2949
+ done(error);
2950
+ }
2951
+ }).timeout(attemptTimeout);
2952
+ });
2953
+
2954
+ describe('#validateDlpPattern - errors', () => {
2955
+ it('should have a validateDlpPattern function', (done) => {
2956
+ try {
2957
+ assert.equal(true, typeof a.validateDlpPattern === 'function');
2958
+ done();
2959
+ } catch (error) {
2960
+ log.error(`Test Failure: ${error}`);
2961
+ done(error);
2962
+ }
2963
+ }).timeout(attemptTimeout);
2964
+ });
2965
+
2966
+ describe('#getDLPEngines - errors', () => {
2967
+ it('should have a getDLPEngines function', (done) => {
2968
+ try {
2969
+ assert.equal(true, typeof a.getDLPEngines === 'function');
2970
+ done();
2971
+ } catch (error) {
2972
+ log.error(`Test Failure: ${error}`);
2973
+ done(error);
2974
+ }
2975
+ }).timeout(attemptTimeout);
2976
+ });
2977
+
2978
+ describe('#addCustomDLPEngine - errors', () => {
2979
+ it('should have a addCustomDLPEngine function', (done) => {
2980
+ try {
2981
+ assert.equal(true, typeof a.addCustomDLPEngine === 'function');
2982
+ done();
2983
+ } catch (error) {
2984
+ log.error(`Test Failure: ${error}`);
2985
+ done(error);
2986
+ }
2987
+ }).timeout(attemptTimeout);
2988
+ });
2989
+
2990
+ describe('#getDLPEnginesSummary - errors', () => {
2991
+ it('should have a getDLPEnginesSummary function', (done) => {
2992
+ try {
2993
+ assert.equal(true, typeof a.getDLPEnginesSummary === 'function');
2994
+ done();
2995
+ } catch (error) {
2996
+ log.error(`Test Failure: ${error}`);
2997
+ done(error);
2998
+ }
2999
+ }).timeout(attemptTimeout);
3000
+ });
3001
+
3002
+ describe('#postDlpEnginesValidateDlpExpr - errors', () => {
3003
+ it('should have a postDlpEnginesValidateDlpExpr function', (done) => {
3004
+ try {
3005
+ assert.equal(true, typeof a.postDlpEnginesValidateDlpExpr === 'function');
3006
+ done();
3007
+ } catch (error) {
3008
+ log.error(`Test Failure: ${error}`);
3009
+ done(error);
3010
+ }
3011
+ }).timeout(attemptTimeout);
3012
+ });
3013
+
3014
+ describe('#getDLPEngineById - errors', () => {
3015
+ it('should have a getDLPEngineById function', (done) => {
3016
+ try {
3017
+ assert.equal(true, typeof a.getDLPEngineById === 'function');
3018
+ done();
3019
+ } catch (error) {
3020
+ log.error(`Test Failure: ${error}`);
3021
+ done(error);
3022
+ }
3023
+ }).timeout(attemptTimeout);
3024
+ it('should error if - missing dlpEngineId', (done) => {
3025
+ try {
3026
+ a.getDLPEngineById(null, (data, error) => {
3027
+ try {
3028
+ const displayE = 'dlpEngineId is required';
3029
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getDLPEngineById', displayE);
3030
+ done();
3031
+ } catch (err) {
3032
+ log.error(`Test Failure: ${err}`);
3033
+ done(err);
3034
+ }
3035
+ });
3036
+ } catch (error) {
3037
+ log.error(`Adapter Exception: ${error}`);
3038
+ done(error);
3039
+ }
3040
+ }).timeout(attemptTimeout);
3041
+ });
3042
+
3043
+ describe('#updateDlpEngine - errors', () => {
3044
+ it('should have a updateDlpEngine function', (done) => {
3045
+ try {
3046
+ assert.equal(true, typeof a.updateDlpEngine === 'function');
3047
+ done();
3048
+ } catch (error) {
3049
+ log.error(`Test Failure: ${error}`);
3050
+ done(error);
3051
+ }
3052
+ }).timeout(attemptTimeout);
3053
+ it('should error if - missing dlpEngineId', (done) => {
3054
+ try {
3055
+ a.updateDlpEngine(null, null, (data, error) => {
3056
+ try {
3057
+ const displayE = 'dlpEngineId is required';
3058
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-updateDlpEngine', displayE);
3059
+ done();
3060
+ } catch (err) {
3061
+ log.error(`Test Failure: ${err}`);
3062
+ done(err);
3063
+ }
3064
+ });
3065
+ } catch (error) {
3066
+ log.error(`Adapter Exception: ${error}`);
3067
+ done(error);
3068
+ }
3069
+ }).timeout(attemptTimeout);
3070
+ });
3071
+
3072
+ describe('#deleteCustomDlpEngine - errors', () => {
3073
+ it('should have a deleteCustomDlpEngine function', (done) => {
3074
+ try {
3075
+ assert.equal(true, typeof a.deleteCustomDlpEngine === 'function');
3076
+ done();
3077
+ } catch (error) {
3078
+ log.error(`Test Failure: ${error}`);
3079
+ done(error);
3080
+ }
3081
+ }).timeout(attemptTimeout);
3082
+ it('should error if - missing dlpEngineId', (done) => {
3083
+ try {
3084
+ a.deleteCustomDlpEngine(null, (data, error) => {
3085
+ try {
3086
+ const displayE = 'dlpEngineId is required';
3087
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-deleteCustomDlpEngine', displayE);
3088
+ done();
3089
+ } catch (err) {
3090
+ log.error(`Test Failure: ${err}`);
3091
+ done(err);
3092
+ }
3093
+ });
3094
+ } catch (error) {
3095
+ log.error(`Adapter Exception: ${error}`);
3096
+ done(error);
3097
+ }
3098
+ }).timeout(attemptTimeout);
3099
+ });
3100
+
3101
+ describe('#getSchemas - errors', () => {
3102
+ it('should have a getSchemas function', (done) => {
3103
+ try {
3104
+ assert.equal(true, typeof a.getSchemas === 'function');
3105
+ done();
3106
+ } catch (error) {
3107
+ log.error(`Test Failure: ${error}`);
3108
+ done(error);
3109
+ }
3110
+ }).timeout(attemptTimeout);
3111
+ });
3112
+
3113
+ describe('#getSchemaLite - errors', () => {
3114
+ it('should have a getSchemaLite function', (done) => {
3115
+ try {
3116
+ assert.equal(true, typeof a.getSchemaLite === 'function');
3117
+ done();
3118
+ } catch (error) {
3119
+ log.error(`Test Failure: ${error}`);
3120
+ done(error);
3121
+ }
3122
+ }).timeout(attemptTimeout);
3123
+ });
3124
+
3125
+ describe('#gettemplates - errors', () => {
3126
+ it('should have a gettemplates function', (done) => {
3127
+ try {
3128
+ assert.equal(true, typeof a.gettemplates === 'function');
3129
+ done();
3130
+ } catch (error) {
3131
+ log.error(`Test Failure: ${error}`);
3132
+ done(error);
3133
+ }
3134
+ }).timeout(attemptTimeout);
3135
+ });
3136
+
3137
+ describe('#addtemplate - errors', () => {
3138
+ it('should have a addtemplate function', (done) => {
3139
+ try {
3140
+ assert.equal(true, typeof a.addtemplate === 'function');
3141
+ done();
3142
+ } catch (error) {
3143
+ log.error(`Test Failure: ${error}`);
3144
+ done(error);
3145
+ }
3146
+ }).timeout(attemptTimeout);
3147
+ });
3148
+
3149
+ describe('#getTemplateById - errors', () => {
3150
+ it('should have a getTemplateById function', (done) => {
3151
+ try {
3152
+ assert.equal(true, typeof a.getTemplateById === 'function');
3153
+ done();
3154
+ } catch (error) {
3155
+ log.error(`Test Failure: ${error}`);
3156
+ done(error);
3157
+ }
3158
+ }).timeout(attemptTimeout);
3159
+ it('should error if - missing templateId', (done) => {
3160
+ try {
3161
+ a.getTemplateById(null, (data, error) => {
3162
+ try {
3163
+ const displayE = 'templateId is required';
3164
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getTemplateById', displayE);
3165
+ done();
3166
+ } catch (err) {
3167
+ log.error(`Test Failure: ${err}`);
3168
+ done(err);
3169
+ }
3170
+ });
3171
+ } catch (error) {
3172
+ log.error(`Adapter Exception: ${error}`);
3173
+ done(error);
3174
+ }
3175
+ }).timeout(attemptTimeout);
3176
+ });
3177
+
3178
+ describe('#updatetemplate - errors', () => {
3179
+ it('should have a updatetemplate function', (done) => {
3180
+ try {
3181
+ assert.equal(true, typeof a.updatetemplate === 'function');
3182
+ done();
3183
+ } catch (error) {
3184
+ log.error(`Test Failure: ${error}`);
3185
+ done(error);
3186
+ }
3187
+ }).timeout(attemptTimeout);
3188
+ it('should error if - missing templateId', (done) => {
3189
+ try {
3190
+ a.updatetemplate(null, (data, error) => {
3191
+ try {
3192
+ const displayE = 'templateId is required';
3193
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-updatetemplate', displayE);
3194
+ done();
3195
+ } catch (err) {
3196
+ log.error(`Test Failure: ${err}`);
3197
+ done(err);
3198
+ }
3199
+ });
3200
+ } catch (error) {
3201
+ log.error(`Adapter Exception: ${error}`);
3202
+ done(error);
3203
+ }
3204
+ }).timeout(attemptTimeout);
3205
+ });
3206
+
3207
+ describe('#deletetemplate - errors', () => {
3208
+ it('should have a deletetemplate function', (done) => {
3209
+ try {
3210
+ assert.equal(true, typeof a.deletetemplate === 'function');
3211
+ done();
3212
+ } catch (error) {
3213
+ log.error(`Test Failure: ${error}`);
3214
+ done(error);
3215
+ }
3216
+ }).timeout(attemptTimeout);
3217
+ it('should error if - missing templateId', (done) => {
3218
+ try {
3219
+ a.deletetemplate(null, (data, error) => {
3220
+ try {
3221
+ const displayE = 'templateId is required';
3222
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-deletetemplate', displayE);
3223
+ done();
3224
+ } catch (err) {
3225
+ log.error(`Test Failure: ${err}`);
3226
+ done(err);
3227
+ }
3228
+ });
3229
+ } catch (error) {
3230
+ log.error(`Adapter Exception: ${error}`);
3231
+ done(error);
3232
+ }
3233
+ }).timeout(attemptTimeout);
3234
+ });
3235
+
3236
+ describe('#getICAPServers - errors', () => {
3237
+ it('should have a getICAPServers function', (done) => {
3238
+ try {
3239
+ assert.equal(true, typeof a.getICAPServers === 'function');
3240
+ done();
3241
+ } catch (error) {
3242
+ log.error(`Test Failure: ${error}`);
3243
+ done(error);
3244
+ }
3245
+ }).timeout(attemptTimeout);
3246
+ });
3247
+
3248
+ describe('#getICAPServerSummary - errors', () => {
3249
+ it('should have a getICAPServerSummary function', (done) => {
3250
+ try {
3251
+ assert.equal(true, typeof a.getICAPServerSummary === 'function');
3252
+ done();
3253
+ } catch (error) {
3254
+ log.error(`Test Failure: ${error}`);
3255
+ done(error);
3256
+ }
3257
+ }).timeout(attemptTimeout);
3258
+ });
3259
+
3260
+ describe('#getICAPServer - errors', () => {
3261
+ it('should have a getICAPServer function', (done) => {
3262
+ try {
3263
+ assert.equal(true, typeof a.getICAPServer === 'function');
3264
+ done();
3265
+ } catch (error) {
3266
+ log.error(`Test Failure: ${error}`);
3267
+ done(error);
3268
+ }
3269
+ }).timeout(attemptTimeout);
3270
+ it('should error if - missing icapServerId', (done) => {
3271
+ try {
3272
+ a.getICAPServer(null, (data, error) => {
3273
+ try {
3274
+ const displayE = 'icapServerId is required';
3275
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getICAPServer', displayE);
3276
+ done();
3277
+ } catch (err) {
3278
+ log.error(`Test Failure: ${err}`);
3279
+ done(err);
3280
+ }
3281
+ });
3282
+ } catch (error) {
3283
+ log.error(`Adapter Exception: ${error}`);
3284
+ done(error);
3285
+ }
3286
+ }).timeout(attemptTimeout);
3287
+ });
3288
+
3289
+ describe('#getProfiles - errors', () => {
3290
+ it('should have a getProfiles function', (done) => {
3291
+ try {
3292
+ assert.equal(true, typeof a.getProfiles === 'function');
3293
+ done();
3294
+ } catch (error) {
3295
+ log.error(`Test Failure: ${error}`);
3296
+ done(error);
3297
+ }
3298
+ }).timeout(attemptTimeout);
3299
+ });
3300
+
3301
+ describe('#getSummary - errors', () => {
3302
+ it('should have a getSummary function', (done) => {
3303
+ try {
3304
+ assert.equal(true, typeof a.getSummary === 'function');
3305
+ done();
3306
+ } catch (error) {
3307
+ log.error(`Test Failure: ${error}`);
3308
+ done(error);
3309
+ }
3310
+ }).timeout(attemptTimeout);
3311
+ });
3312
+
3313
+ describe('#getProfileById - errors', () => {
3314
+ it('should have a getProfileById function', (done) => {
3315
+ try {
3316
+ assert.equal(true, typeof a.getProfileById === 'function');
3317
+ done();
3318
+ } catch (error) {
3319
+ log.error(`Test Failure: ${error}`);
3320
+ done(error);
3321
+ }
3322
+ }).timeout(attemptTimeout);
3323
+ it('should error if - missing profileId', (done) => {
3324
+ try {
3325
+ a.getProfileById(null, (data, error) => {
3326
+ try {
3327
+ const displayE = 'profileId is required';
3328
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getProfileById', displayE);
3329
+ done();
3330
+ } catch (err) {
3331
+ log.error(`Test Failure: ${err}`);
3332
+ done(err);
3333
+ }
3334
+ });
3335
+ } catch (error) {
3336
+ log.error(`Adapter Exception: ${error}`);
3337
+ done(error);
3338
+ }
3339
+ }).timeout(attemptTimeout);
3340
+ });
3341
+
3342
+ describe('#getIncidentReceiverServers - errors', () => {
3343
+ it('should have a getIncidentReceiverServers function', (done) => {
3344
+ try {
3345
+ assert.equal(true, typeof a.getIncidentReceiverServers === 'function');
3346
+ done();
3347
+ } catch (error) {
3348
+ log.error(`Test Failure: ${error}`);
3349
+ done(error);
3350
+ }
3351
+ }).timeout(attemptTimeout);
3352
+ });
3353
+
3354
+ describe('#getIncidentReceiverServerSummary - errors', () => {
3355
+ it('should have a getIncidentReceiverServerSummary function', (done) => {
3356
+ try {
3357
+ assert.equal(true, typeof a.getIncidentReceiverServerSummary === 'function');
3358
+ done();
3359
+ } catch (error) {
3360
+ log.error(`Test Failure: ${error}`);
3361
+ done(error);
3362
+ }
3363
+ }).timeout(attemptTimeout);
3364
+ });
3365
+
3366
+ describe('#getIncidentReceiverServer - errors', () => {
3367
+ it('should have a getIncidentReceiverServer function', (done) => {
3368
+ try {
3369
+ assert.equal(true, typeof a.getIncidentReceiverServer === 'function');
3370
+ done();
3371
+ } catch (error) {
3372
+ log.error(`Test Failure: ${error}`);
3373
+ done(error);
3374
+ }
3375
+ }).timeout(attemptTimeout);
3376
+ it('should error if - missing incidentReceiverServerId', (done) => {
3377
+ try {
3378
+ a.getIncidentReceiverServer(null, (data, error) => {
3379
+ try {
3380
+ const displayE = 'incidentReceiverServerId is required';
3381
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getIncidentReceiverServer', displayE);
3382
+ done();
3383
+ } catch (err) {
3384
+ log.error(`Test Failure: ${err}`);
3385
+ done(err);
3386
+ }
3387
+ });
3388
+ } catch (error) {
3389
+ log.error(`Adapter Exception: ${error}`);
3390
+ done(error);
3391
+ }
3392
+ }).timeout(attemptTimeout);
3393
+ });
3394
+
3395
+ describe('#getRules - errors', () => {
3396
+ it('should have a getRules function', (done) => {
3397
+ try {
3398
+ assert.equal(true, typeof a.getRules === 'function');
3399
+ done();
3400
+ } catch (error) {
3401
+ log.error(`Test Failure: ${error}`);
3402
+ done(error);
3403
+ }
3404
+ }).timeout(attemptTimeout);
3405
+ });
3406
+
3407
+ describe('#addRule - errors', () => {
3408
+ it('should have a addRule function', (done) => {
3409
+ try {
3410
+ assert.equal(true, typeof a.addRule === 'function');
3411
+ done();
3412
+ } catch (error) {
3413
+ log.error(`Test Failure: ${error}`);
3414
+ done(error);
3415
+ }
3416
+ }).timeout(attemptTimeout);
3417
+ });
3418
+
3419
+ describe('#getWebDlpRulesLite - errors', () => {
3420
+ it('should have a getWebDlpRulesLite function', (done) => {
3421
+ try {
3422
+ assert.equal(true, typeof a.getWebDlpRulesLite === 'function');
3423
+ done();
3424
+ } catch (error) {
3425
+ log.error(`Test Failure: ${error}`);
3426
+ done(error);
3427
+ }
3428
+ }).timeout(attemptTimeout);
3429
+ });
3430
+
3431
+ describe('#getRuleById - errors', () => {
3432
+ it('should have a getRuleById function', (done) => {
3433
+ try {
3434
+ assert.equal(true, typeof a.getRuleById === 'function');
3435
+ done();
3436
+ } catch (error) {
3437
+ log.error(`Test Failure: ${error}`);
3438
+ done(error);
3439
+ }
3440
+ }).timeout(attemptTimeout);
3441
+ it('should error if - missing ruleId', (done) => {
3442
+ try {
3443
+ a.getRuleById(null, (data, error) => {
3444
+ try {
3445
+ const displayE = 'ruleId is required';
3446
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getRuleById', displayE);
3447
+ done();
3448
+ } catch (err) {
3449
+ log.error(`Test Failure: ${err}`);
3450
+ done(err);
3451
+ }
3452
+ });
3453
+ } catch (error) {
3454
+ log.error(`Adapter Exception: ${error}`);
3455
+ done(error);
3456
+ }
3457
+ }).timeout(attemptTimeout);
3458
+ });
3459
+
3460
+ describe('#updateRule - errors', () => {
3461
+ it('should have a updateRule function', (done) => {
3462
+ try {
3463
+ assert.equal(true, typeof a.updateRule === 'function');
3464
+ done();
3465
+ } catch (error) {
3466
+ log.error(`Test Failure: ${error}`);
3467
+ done(error);
3468
+ }
3469
+ }).timeout(attemptTimeout);
3470
+ it('should error if - missing ruleId', (done) => {
3471
+ try {
3472
+ a.updateRule(null, null, (data, error) => {
3473
+ try {
3474
+ const displayE = 'ruleId is required';
3475
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-updateRule', displayE);
3476
+ done();
3477
+ } catch (err) {
3478
+ log.error(`Test Failure: ${err}`);
3479
+ done(err);
3480
+ }
3481
+ });
3482
+ } catch (error) {
3483
+ log.error(`Adapter Exception: ${error}`);
3484
+ done(error);
3485
+ }
3486
+ }).timeout(attemptTimeout);
3487
+ });
3488
+
3489
+ describe('#deleteRule - errors', () => {
3490
+ it('should have a deleteRule function', (done) => {
3491
+ try {
3492
+ assert.equal(true, typeof a.deleteRule === 'function');
3493
+ done();
3494
+ } catch (error) {
3495
+ log.error(`Test Failure: ${error}`);
3496
+ done(error);
3497
+ }
3498
+ }).timeout(attemptTimeout);
3499
+ it('should error if - missing ruleId', (done) => {
3500
+ try {
3501
+ a.deleteRule(null, (data, error) => {
3502
+ try {
3503
+ const displayE = 'ruleId is required';
3504
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-deleteRule', displayE);
3505
+ done();
3506
+ } catch (err) {
3507
+ log.error(`Test Failure: ${err}`);
3508
+ done(err);
3509
+ }
3510
+ });
3511
+ } catch (error) {
3512
+ log.error(`Adapter Exception: ${error}`);
3513
+ done(error);
3514
+ }
3515
+ }).timeout(attemptTimeout);
3516
+ });
3517
+
3518
+ describe('#getDeviceGroups - errors', () => {
3519
+ it('should have a getDeviceGroups function', (done) => {
3520
+ try {
3521
+ assert.equal(true, typeof a.getDeviceGroups === 'function');
3522
+ done();
3523
+ } catch (error) {
3524
+ log.error(`Test Failure: ${error}`);
3525
+ done(error);
3526
+ }
3527
+ }).timeout(attemptTimeout);
3528
+ });
3529
+
3530
+ describe('#getDevices - errors', () => {
3531
+ it('should have a getDevices function', (done) => {
3532
+ try {
3533
+ assert.equal(true, typeof a.getDevices === 'function');
3534
+ done();
3535
+ } catch (error) {
3536
+ log.error(`Test Failure: ${error}`);
3537
+ done(error);
3538
+ }
3539
+ }).timeout(attemptTimeout);
3540
+ });
3541
+
3542
+ describe('#getDevicesLite - errors', () => {
3543
+ it('should have a getDevicesLite function', (done) => {
3544
+ try {
3545
+ assert.equal(true, typeof a.getDevicesLite === 'function');
3546
+ done();
3547
+ } catch (error) {
3548
+ log.error(`Test Failure: ${error}`);
3549
+ done(error);
3550
+ }
3551
+ }).timeout(attemptTimeout);
3552
+ });
3553
+
3554
+ describe('#getEventReportEntryCsvExportStatus - errors', () => {
3555
+ it('should have a getEventReportEntryCsvExportStatus function', (done) => {
3556
+ try {
3557
+ assert.equal(true, typeof a.getEventReportEntryCsvExportStatus === 'function');
3558
+ done();
3559
+ } catch (error) {
3560
+ log.error(`Test Failure: ${error}`);
3561
+ done(error);
3562
+ }
3563
+ }).timeout(attemptTimeout);
3564
+ });
3565
+
3566
+ describe('#startEventReportEntryCsvExport - errors', () => {
3567
+ it('should have a startEventReportEntryCsvExport function', (done) => {
3568
+ try {
3569
+ assert.equal(true, typeof a.startEventReportEntryCsvExport === 'function');
3570
+ done();
3571
+ } catch (error) {
3572
+ log.error(`Test Failure: ${error}`);
3573
+ done(error);
3574
+ }
3575
+ }).timeout(attemptTimeout);
3576
+ });
3577
+
3578
+ describe('#cancelEventReportEntryCsvExport - errors', () => {
3579
+ it('should have a cancelEventReportEntryCsvExport function', (done) => {
3580
+ try {
3581
+ assert.equal(true, typeof a.cancelEventReportEntryCsvExport === 'function');
3582
+ done();
3583
+ } catch (error) {
3584
+ log.error(`Test Failure: ${error}`);
3585
+ done(error);
3586
+ }
3587
+ }).timeout(attemptTimeout);
3588
+ });
3589
+
3590
+ describe('#getEventReportEntryCsvData - errors', () => {
3591
+ it('should have a getEventReportEntryCsvData function', (done) => {
3592
+ try {
3593
+ assert.equal(true, typeof a.getEventReportEntryCsvData === 'function');
3594
+ done();
3595
+ } catch (error) {
3596
+ log.error(`Test Failure: ${error}`);
3597
+ done(error);
3598
+ }
3599
+ }).timeout(attemptTimeout);
3600
+ });
3601
+
3602
+ describe('#getFirewallFilteringRules - errors', () => {
3603
+ it('should have a getFirewallFilteringRules function', (done) => {
3604
+ try {
3605
+ assert.equal(true, typeof a.getFirewallFilteringRules === 'function');
3606
+ done();
3607
+ } catch (error) {
3608
+ log.error(`Test Failure: ${error}`);
3609
+ done(error);
3610
+ }
3611
+ }).timeout(attemptTimeout);
3612
+ });
3613
+
3614
+ describe('#createFirewallFilteringRule - errors', () => {
3615
+ it('should have a createFirewallFilteringRule function', (done) => {
3616
+ try {
3617
+ assert.equal(true, typeof a.createFirewallFilteringRule === 'function');
3618
+ done();
3619
+ } catch (error) {
3620
+ log.error(`Test Failure: ${error}`);
3621
+ done(error);
3622
+ }
3623
+ }).timeout(attemptTimeout);
3624
+ });
3625
+
3626
+ describe('#getFirewallFilteringRule - errors', () => {
3627
+ it('should have a getFirewallFilteringRule function', (done) => {
3628
+ try {
3629
+ assert.equal(true, typeof a.getFirewallFilteringRule === 'function');
3630
+ done();
3631
+ } catch (error) {
3632
+ log.error(`Test Failure: ${error}`);
3633
+ done(error);
3634
+ }
3635
+ }).timeout(attemptTimeout);
3636
+ it('should error if - missing ruleId', (done) => {
3637
+ try {
3638
+ a.getFirewallFilteringRule(null, (data, error) => {
3639
+ try {
3640
+ const displayE = 'ruleId is required';
3641
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getFirewallFilteringRule', displayE);
3642
+ done();
3643
+ } catch (err) {
3644
+ log.error(`Test Failure: ${err}`);
3645
+ done(err);
3646
+ }
3647
+ });
3648
+ } catch (error) {
3649
+ log.error(`Adapter Exception: ${error}`);
3650
+ done(error);
3651
+ }
3652
+ }).timeout(attemptTimeout);
3653
+ });
3654
+
3655
+ describe('#updateFirewallFilteringRule - errors', () => {
3656
+ it('should have a updateFirewallFilteringRule function', (done) => {
3657
+ try {
3658
+ assert.equal(true, typeof a.updateFirewallFilteringRule === 'function');
3659
+ done();
3660
+ } catch (error) {
3661
+ log.error(`Test Failure: ${error}`);
3662
+ done(error);
3663
+ }
3664
+ }).timeout(attemptTimeout);
3665
+ it('should error if - missing ruleId', (done) => {
3666
+ try {
3667
+ a.updateFirewallFilteringRule(null, null, (data, error) => {
3668
+ try {
3669
+ const displayE = 'ruleId is required';
3670
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-updateFirewallFilteringRule', displayE);
3671
+ done();
3672
+ } catch (err) {
3673
+ log.error(`Test Failure: ${err}`);
3674
+ done(err);
3675
+ }
3676
+ });
3677
+ } catch (error) {
3678
+ log.error(`Adapter Exception: ${error}`);
3679
+ done(error);
3680
+ }
3681
+ }).timeout(attemptTimeout);
3682
+ });
3683
+
3684
+ describe('#deleteFirewallFilteringRule - errors', () => {
3685
+ it('should have a deleteFirewallFilteringRule function', (done) => {
3686
+ try {
3687
+ assert.equal(true, typeof a.deleteFirewallFilteringRule === 'function');
3688
+ done();
3689
+ } catch (error) {
3690
+ log.error(`Test Failure: ${error}`);
3691
+ done(error);
3692
+ }
3693
+ }).timeout(attemptTimeout);
3694
+ it('should error if - missing ruleId', (done) => {
3695
+ try {
3696
+ a.deleteFirewallFilteringRule(null, (data, error) => {
3697
+ try {
3698
+ const displayE = 'ruleId is required';
3699
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-deleteFirewallFilteringRule', displayE);
3700
+ done();
3701
+ } catch (err) {
3702
+ log.error(`Test Failure: ${err}`);
3703
+ done(err);
3704
+ }
3705
+ });
3706
+ } catch (error) {
3707
+ log.error(`Adapter Exception: ${error}`);
3708
+ done(error);
3709
+ }
3710
+ }).timeout(attemptTimeout);
3711
+ });
3712
+
3713
+ describe('#getDestinationIpGroups - errors', () => {
3714
+ it('should have a getDestinationIpGroups function', (done) => {
3715
+ try {
3716
+ assert.equal(true, typeof a.getDestinationIpGroups === 'function');
3717
+ done();
3718
+ } catch (error) {
3719
+ log.error(`Test Failure: ${error}`);
3720
+ done(error);
3721
+ }
3722
+ }).timeout(attemptTimeout);
3723
+ });
3724
+
3725
+ describe('#addDestinationIpGroup - errors', () => {
3726
+ it('should have a addDestinationIpGroup function', (done) => {
3727
+ try {
3728
+ assert.equal(true, typeof a.addDestinationIpGroup === 'function');
3729
+ done();
3730
+ } catch (error) {
3731
+ log.error(`Test Failure: ${error}`);
3732
+ done(error);
3733
+ }
3734
+ }).timeout(attemptTimeout);
3735
+ });
3736
+
3737
+ describe('#getDestinationIpv6Groups - errors', () => {
3738
+ it('should have a getDestinationIpv6Groups function', (done) => {
3739
+ try {
3740
+ assert.equal(true, typeof a.getDestinationIpv6Groups === 'function');
3741
+ done();
3742
+ } catch (error) {
3743
+ log.error(`Test Failure: ${error}`);
3744
+ done(error);
3745
+ }
3746
+ }).timeout(attemptTimeout);
3747
+ });
3748
+
3749
+ describe('#getDestinationIpv6GroupsLite - errors', () => {
3750
+ it('should have a getDestinationIpv6GroupsLite function', (done) => {
3751
+ try {
3752
+ assert.equal(true, typeof a.getDestinationIpv6GroupsLite === 'function');
3753
+ done();
3754
+ } catch (error) {
3755
+ log.error(`Test Failure: ${error}`);
3756
+ done(error);
3757
+ }
3758
+ }).timeout(attemptTimeout);
3759
+ });
3760
+
3761
+ describe('#getDestinationIpGroupsLite - errors', () => {
3762
+ it('should have a getDestinationIpGroupsLite function', (done) => {
3763
+ try {
3764
+ assert.equal(true, typeof a.getDestinationIpGroupsLite === 'function');
3765
+ done();
3766
+ } catch (error) {
3767
+ log.error(`Test Failure: ${error}`);
3768
+ done(error);
3769
+ }
3770
+ }).timeout(attemptTimeout);
3771
+ });
3772
+
3773
+ describe('#getDestinationIpGroupById - errors', () => {
3774
+ it('should have a getDestinationIpGroupById function', (done) => {
3775
+ try {
3776
+ assert.equal(true, typeof a.getDestinationIpGroupById === 'function');
3777
+ done();
3778
+ } catch (error) {
3779
+ log.error(`Test Failure: ${error}`);
3780
+ done(error);
3781
+ }
3782
+ }).timeout(attemptTimeout);
3783
+ it('should error if - missing ipGroupId', (done) => {
3784
+ try {
3785
+ a.getDestinationIpGroupById(null, (data, error) => {
3786
+ try {
3787
+ const displayE = 'ipGroupId is required';
3788
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getDestinationIpGroupById', displayE);
3789
+ done();
3790
+ } catch (err) {
3791
+ log.error(`Test Failure: ${err}`);
3792
+ done(err);
3793
+ }
3794
+ });
3795
+ } catch (error) {
3796
+ log.error(`Adapter Exception: ${error}`);
3797
+ done(error);
3798
+ }
3799
+ }).timeout(attemptTimeout);
3800
+ });
3801
+
3802
+ describe('#editDestinationIpGroup - errors', () => {
3803
+ it('should have a editDestinationIpGroup function', (done) => {
3804
+ try {
3805
+ assert.equal(true, typeof a.editDestinationIpGroup === 'function');
3806
+ done();
3807
+ } catch (error) {
3808
+ log.error(`Test Failure: ${error}`);
3809
+ done(error);
3810
+ }
3811
+ }).timeout(attemptTimeout);
3812
+ it('should error if - missing ipGroupId', (done) => {
3813
+ try {
3814
+ a.editDestinationIpGroup(null, (data, error) => {
3815
+ try {
3816
+ const displayE = 'ipGroupId is required';
3817
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-editDestinationIpGroup', displayE);
3818
+ done();
3819
+ } catch (err) {
3820
+ log.error(`Test Failure: ${err}`);
3821
+ done(err);
3822
+ }
3823
+ });
3824
+ } catch (error) {
3825
+ log.error(`Adapter Exception: ${error}`);
3826
+ done(error);
3827
+ }
3828
+ }).timeout(attemptTimeout);
3829
+ });
3830
+
3831
+ describe('#deleteDestinationIpGroup - errors', () => {
3832
+ it('should have a deleteDestinationIpGroup function', (done) => {
3833
+ try {
3834
+ assert.equal(true, typeof a.deleteDestinationIpGroup === 'function');
3835
+ done();
3836
+ } catch (error) {
3837
+ log.error(`Test Failure: ${error}`);
3838
+ done(error);
3839
+ }
3840
+ }).timeout(attemptTimeout);
3841
+ it('should error if - missing ipGroupId', (done) => {
3842
+ try {
3843
+ a.deleteDestinationIpGroup(null, (data, error) => {
3844
+ try {
3845
+ const displayE = 'ipGroupId is required';
3846
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-deleteDestinationIpGroup', displayE);
3847
+ done();
3848
+ } catch (err) {
3849
+ log.error(`Test Failure: ${err}`);
3850
+ done(err);
3851
+ }
3852
+ });
3853
+ } catch (error) {
3854
+ log.error(`Adapter Exception: ${error}`);
3855
+ done(error);
3856
+ }
3857
+ }).timeout(attemptTimeout);
3858
+ });
3859
+
3860
+ describe('#getSourceIpGroups - errors', () => {
3861
+ it('should have a getSourceIpGroups function', (done) => {
3862
+ try {
3863
+ assert.equal(true, typeof a.getSourceIpGroups === 'function');
3864
+ done();
3865
+ } catch (error) {
3866
+ log.error(`Test Failure: ${error}`);
3867
+ done(error);
3868
+ }
3869
+ }).timeout(attemptTimeout);
3870
+ });
3871
+
3872
+ describe('#addSourceIpGroup - errors', () => {
3873
+ it('should have a addSourceIpGroup function', (done) => {
3874
+ try {
3875
+ assert.equal(true, typeof a.addSourceIpGroup === 'function');
3876
+ done();
3877
+ } catch (error) {
3878
+ log.error(`Test Failure: ${error}`);
3879
+ done(error);
3880
+ }
3881
+ }).timeout(attemptTimeout);
3882
+ });
3883
+
3884
+ describe('#getSourceIpv6Groups - errors', () => {
3885
+ it('should have a getSourceIpv6Groups function', (done) => {
3886
+ try {
3887
+ assert.equal(true, typeof a.getSourceIpv6Groups === 'function');
3888
+ done();
3889
+ } catch (error) {
3890
+ log.error(`Test Failure: ${error}`);
3891
+ done(error);
3892
+ }
3893
+ }).timeout(attemptTimeout);
3894
+ });
3895
+
3896
+ describe('#getSourceIpv6GroupsLite - errors', () => {
3897
+ it('should have a getSourceIpv6GroupsLite function', (done) => {
3898
+ try {
3899
+ assert.equal(true, typeof a.getSourceIpv6GroupsLite === 'function');
3900
+ done();
3901
+ } catch (error) {
3902
+ log.error(`Test Failure: ${error}`);
3903
+ done(error);
3904
+ }
3905
+ }).timeout(attemptTimeout);
3906
+ });
3907
+
3908
+ describe('#getSourceIpGroupsLite - errors', () => {
3909
+ it('should have a getSourceIpGroupsLite function', (done) => {
3910
+ try {
3911
+ assert.equal(true, typeof a.getSourceIpGroupsLite === 'function');
3912
+ done();
3913
+ } catch (error) {
3914
+ log.error(`Test Failure: ${error}`);
3915
+ done(error);
3916
+ }
3917
+ }).timeout(attemptTimeout);
3918
+ });
3919
+
3920
+ describe('#getSourceIpGroupById - errors', () => {
3921
+ it('should have a getSourceIpGroupById function', (done) => {
3922
+ try {
3923
+ assert.equal(true, typeof a.getSourceIpGroupById === 'function');
3924
+ done();
3925
+ } catch (error) {
3926
+ log.error(`Test Failure: ${error}`);
3927
+ done(error);
3928
+ }
3929
+ }).timeout(attemptTimeout);
3930
+ it('should error if - missing ipGroupId', (done) => {
3931
+ try {
3932
+ a.getSourceIpGroupById(null, (data, error) => {
3933
+ try {
3934
+ const displayE = 'ipGroupId is required';
3935
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getSourceIpGroupById', displayE);
3936
+ done();
3937
+ } catch (err) {
3938
+ log.error(`Test Failure: ${err}`);
3939
+ done(err);
3940
+ }
3941
+ });
3942
+ } catch (error) {
3943
+ log.error(`Adapter Exception: ${error}`);
3944
+ done(error);
3945
+ }
3946
+ }).timeout(attemptTimeout);
3947
+ });
3948
+
3949
+ describe('#editSourceIpGroup - errors', () => {
3950
+ it('should have a editSourceIpGroup function', (done) => {
3951
+ try {
3952
+ assert.equal(true, typeof a.editSourceIpGroup === 'function');
3953
+ done();
3954
+ } catch (error) {
3955
+ log.error(`Test Failure: ${error}`);
3956
+ done(error);
3957
+ }
3958
+ }).timeout(attemptTimeout);
3959
+ it('should error if - missing ipGroupId', (done) => {
3960
+ try {
3961
+ a.editSourceIpGroup(null, (data, error) => {
3962
+ try {
3963
+ const displayE = 'ipGroupId is required';
3964
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-editSourceIpGroup', displayE);
3965
+ done();
3966
+ } catch (err) {
3967
+ log.error(`Test Failure: ${err}`);
3968
+ done(err);
3969
+ }
3970
+ });
3971
+ } catch (error) {
3972
+ log.error(`Adapter Exception: ${error}`);
3973
+ done(error);
3974
+ }
3975
+ }).timeout(attemptTimeout);
3976
+ });
3977
+
3978
+ describe('#deleteSourceIpGroup - errors', () => {
3979
+ it('should have a deleteSourceIpGroup function', (done) => {
3980
+ try {
3981
+ assert.equal(true, typeof a.deleteSourceIpGroup === 'function');
3982
+ done();
3983
+ } catch (error) {
3984
+ log.error(`Test Failure: ${error}`);
3985
+ done(error);
3986
+ }
3987
+ }).timeout(attemptTimeout);
3988
+ it('should error if - missing ipGroupId', (done) => {
3989
+ try {
3990
+ a.deleteSourceIpGroup(null, (data, error) => {
3991
+ try {
3992
+ const displayE = 'ipGroupId is required';
3993
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-deleteSourceIpGroup', displayE);
3994
+ done();
3995
+ } catch (err) {
3996
+ log.error(`Test Failure: ${err}`);
3997
+ done(err);
3998
+ }
3999
+ });
4000
+ } catch (error) {
4001
+ log.error(`Adapter Exception: ${error}`);
4002
+ done(error);
4003
+ }
4004
+ }).timeout(attemptTimeout);
4005
+ });
4006
+
4007
+ describe('#getNetowrkApplicationGroups - errors', () => {
4008
+ it('should have a getNetowrkApplicationGroups function', (done) => {
4009
+ try {
4010
+ assert.equal(true, typeof a.getNetowrkApplicationGroups === 'function');
4011
+ done();
4012
+ } catch (error) {
4013
+ log.error(`Test Failure: ${error}`);
4014
+ done(error);
4015
+ }
4016
+ }).timeout(attemptTimeout);
4017
+ });
4018
+
4019
+ describe('#createNetworkApplicationGroup - errors', () => {
4020
+ it('should have a createNetworkApplicationGroup function', (done) => {
4021
+ try {
4022
+ assert.equal(true, typeof a.createNetworkApplicationGroup === 'function');
4023
+ done();
4024
+ } catch (error) {
4025
+ log.error(`Test Failure: ${error}`);
4026
+ done(error);
4027
+ }
4028
+ }).timeout(attemptTimeout);
4029
+ });
4030
+
4031
+ describe('#getNetowrkApplicationGroupsLite - errors', () => {
4032
+ it('should have a getNetowrkApplicationGroupsLite function', (done) => {
4033
+ try {
4034
+ assert.equal(true, typeof a.getNetowrkApplicationGroupsLite === 'function');
4035
+ done();
4036
+ } catch (error) {
4037
+ log.error(`Test Failure: ${error}`);
4038
+ done(error);
4039
+ }
4040
+ }).timeout(attemptTimeout);
4041
+ });
4042
+
4043
+ describe('#getNetworkApplicationGroupById - errors', () => {
4044
+ it('should have a getNetworkApplicationGroupById function', (done) => {
4045
+ try {
4046
+ assert.equal(true, typeof a.getNetworkApplicationGroupById === 'function');
4047
+ done();
4048
+ } catch (error) {
4049
+ log.error(`Test Failure: ${error}`);
4050
+ done(error);
4051
+ }
4052
+ }).timeout(attemptTimeout);
4053
+ it('should error if - missing groupId', (done) => {
4054
+ try {
4055
+ a.getNetworkApplicationGroupById(null, (data, error) => {
4056
+ try {
4057
+ const displayE = 'groupId is required';
4058
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getNetworkApplicationGroupById', displayE);
4059
+ done();
4060
+ } catch (err) {
4061
+ log.error(`Test Failure: ${err}`);
4062
+ done(err);
4063
+ }
4064
+ });
4065
+ } catch (error) {
4066
+ log.error(`Adapter Exception: ${error}`);
4067
+ done(error);
4068
+ }
4069
+ }).timeout(attemptTimeout);
4070
+ });
4071
+
4072
+ describe('#updateNetworkApplicationGroup - errors', () => {
4073
+ it('should have a updateNetworkApplicationGroup function', (done) => {
4074
+ try {
4075
+ assert.equal(true, typeof a.updateNetworkApplicationGroup === 'function');
4076
+ done();
4077
+ } catch (error) {
4078
+ log.error(`Test Failure: ${error}`);
4079
+ done(error);
4080
+ }
4081
+ }).timeout(attemptTimeout);
4082
+ it('should error if - missing groupId', (done) => {
4083
+ try {
4084
+ a.updateNetworkApplicationGroup(null, (data, error) => {
4085
+ try {
4086
+ const displayE = 'groupId is required';
4087
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-updateNetworkApplicationGroup', displayE);
4088
+ done();
4089
+ } catch (err) {
4090
+ log.error(`Test Failure: ${err}`);
4091
+ done(err);
4092
+ }
4093
+ });
4094
+ } catch (error) {
4095
+ log.error(`Adapter Exception: ${error}`);
4096
+ done(error);
4097
+ }
4098
+ }).timeout(attemptTimeout);
4099
+ });
4100
+
4101
+ describe('#deleteNetworkApplicationGroup - errors', () => {
4102
+ it('should have a deleteNetworkApplicationGroup function', (done) => {
4103
+ try {
4104
+ assert.equal(true, typeof a.deleteNetworkApplicationGroup === 'function');
4105
+ done();
4106
+ } catch (error) {
4107
+ log.error(`Test Failure: ${error}`);
4108
+ done(error);
4109
+ }
4110
+ }).timeout(attemptTimeout);
4111
+ it('should error if - missing groupId', (done) => {
4112
+ try {
4113
+ a.deleteNetworkApplicationGroup(null, (data, error) => {
4114
+ try {
4115
+ const displayE = 'groupId is required';
4116
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-deleteNetworkApplicationGroup', displayE);
4117
+ done();
4118
+ } catch (err) {
4119
+ log.error(`Test Failure: ${err}`);
4120
+ done(err);
4121
+ }
4122
+ });
4123
+ } catch (error) {
4124
+ log.error(`Adapter Exception: ${error}`);
4125
+ done(error);
4126
+ }
4127
+ }).timeout(attemptTimeout);
4128
+ });
4129
+
4130
+ describe('#getNetworkApplications - errors', () => {
4131
+ it('should have a getNetworkApplications function', (done) => {
4132
+ try {
4133
+ assert.equal(true, typeof a.getNetworkApplications === 'function');
4134
+ done();
4135
+ } catch (error) {
4136
+ log.error(`Test Failure: ${error}`);
4137
+ done(error);
4138
+ }
4139
+ }).timeout(attemptTimeout);
4140
+ });
4141
+
4142
+ describe('#getNetworkApplicationById - errors', () => {
4143
+ it('should have a getNetworkApplicationById function', (done) => {
4144
+ try {
4145
+ assert.equal(true, typeof a.getNetworkApplicationById === 'function');
4146
+ done();
4147
+ } catch (error) {
4148
+ log.error(`Test Failure: ${error}`);
4149
+ done(error);
4150
+ }
4151
+ }).timeout(attemptTimeout);
4152
+ it('should error if - missing appId', (done) => {
4153
+ try {
4154
+ a.getNetworkApplicationById(null, null, (data, error) => {
4155
+ try {
4156
+ const displayE = 'appId is required';
4157
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getNetworkApplicationById', displayE);
4158
+ done();
4159
+ } catch (err) {
4160
+ log.error(`Test Failure: ${err}`);
4161
+ done(err);
4162
+ }
4163
+ });
4164
+ } catch (error) {
4165
+ log.error(`Adapter Exception: ${error}`);
4166
+ done(error);
4167
+ }
4168
+ }).timeout(attemptTimeout);
4169
+ });
4170
+
4171
+ describe('#getNetworkServiceGroups - errors', () => {
4172
+ it('should have a getNetworkServiceGroups function', (done) => {
4173
+ try {
4174
+ assert.equal(true, typeof a.getNetworkServiceGroups === 'function');
4175
+ done();
4176
+ } catch (error) {
4177
+ log.error(`Test Failure: ${error}`);
4178
+ done(error);
4179
+ }
4180
+ }).timeout(attemptTimeout);
4181
+ });
4182
+
4183
+ describe('#addCustomNetworkServiceGroup - errors', () => {
4184
+ it('should have a addCustomNetworkServiceGroup function', (done) => {
4185
+ try {
4186
+ assert.equal(true, typeof a.addCustomNetworkServiceGroup === 'function');
4187
+ done();
4188
+ } catch (error) {
4189
+ log.error(`Test Failure: ${error}`);
4190
+ done(error);
4191
+ }
4192
+ }).timeout(attemptTimeout);
4193
+ });
4194
+
4195
+ describe('#getNetworkServiceGroupsLite - errors', () => {
4196
+ it('should have a getNetworkServiceGroupsLite function', (done) => {
4197
+ try {
4198
+ assert.equal(true, typeof a.getNetworkServiceGroupsLite === 'function');
4199
+ done();
4200
+ } catch (error) {
4201
+ log.error(`Test Failure: ${error}`);
4202
+ done(error);
4203
+ }
4204
+ }).timeout(attemptTimeout);
4205
+ });
4206
+
4207
+ describe('#getNetworkServiceGroupById - errors', () => {
4208
+ it('should have a getNetworkServiceGroupById function', (done) => {
4209
+ try {
4210
+ assert.equal(true, typeof a.getNetworkServiceGroupById === 'function');
4211
+ done();
4212
+ } catch (error) {
4213
+ log.error(`Test Failure: ${error}`);
4214
+ done(error);
4215
+ }
4216
+ }).timeout(attemptTimeout);
4217
+ it('should error if - missing serviceGroupId', (done) => {
4218
+ try {
4219
+ a.getNetworkServiceGroupById(null, (data, error) => {
4220
+ try {
4221
+ const displayE = 'serviceGroupId is required';
4222
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getNetworkServiceGroupById', displayE);
4223
+ done();
4224
+ } catch (err) {
4225
+ log.error(`Test Failure: ${err}`);
4226
+ done(err);
4227
+ }
4228
+ });
4229
+ } catch (error) {
4230
+ log.error(`Adapter Exception: ${error}`);
4231
+ done(error);
4232
+ }
4233
+ }).timeout(attemptTimeout);
4234
+ });
4235
+
4236
+ describe('#editNetworkServiceGroup - errors', () => {
4237
+ it('should have a editNetworkServiceGroup function', (done) => {
4238
+ try {
4239
+ assert.equal(true, typeof a.editNetworkServiceGroup === 'function');
4240
+ done();
4241
+ } catch (error) {
4242
+ log.error(`Test Failure: ${error}`);
4243
+ done(error);
4244
+ }
4245
+ }).timeout(attemptTimeout);
4246
+ it('should error if - missing serviceGroupId', (done) => {
4247
+ try {
4248
+ a.editNetworkServiceGroup(null, (data, error) => {
4249
+ try {
4250
+ const displayE = 'serviceGroupId is required';
4251
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-editNetworkServiceGroup', displayE);
4252
+ done();
4253
+ } catch (err) {
4254
+ log.error(`Test Failure: ${err}`);
4255
+ done(err);
4256
+ }
4257
+ });
4258
+ } catch (error) {
4259
+ log.error(`Adapter Exception: ${error}`);
4260
+ done(error);
4261
+ }
4262
+ }).timeout(attemptTimeout);
4263
+ });
4264
+
4265
+ describe('#deleteCustomNetowrkServiceGroup - errors', () => {
4266
+ it('should have a deleteCustomNetowrkServiceGroup function', (done) => {
4267
+ try {
4268
+ assert.equal(true, typeof a.deleteCustomNetowrkServiceGroup === 'function');
4269
+ done();
4270
+ } catch (error) {
4271
+ log.error(`Test Failure: ${error}`);
4272
+ done(error);
4273
+ }
4274
+ }).timeout(attemptTimeout);
4275
+ it('should error if - missing serviceGroupId', (done) => {
4276
+ try {
4277
+ a.deleteCustomNetowrkServiceGroup(null, (data, error) => {
4278
+ try {
4279
+ const displayE = 'serviceGroupId is required';
4280
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-deleteCustomNetowrkServiceGroup', displayE);
4281
+ done();
4282
+ } catch (err) {
4283
+ log.error(`Test Failure: ${err}`);
4284
+ done(err);
4285
+ }
4286
+ });
4287
+ } catch (error) {
4288
+ log.error(`Adapter Exception: ${error}`);
4289
+ done(error);
4290
+ }
4291
+ }).timeout(attemptTimeout);
4292
+ });
4293
+
4294
+ describe('#getNetworkServices - errors', () => {
4295
+ it('should have a getNetworkServices function', (done) => {
4296
+ try {
4297
+ assert.equal(true, typeof a.getNetworkServices === 'function');
4298
+ done();
4299
+ } catch (error) {
4300
+ log.error(`Test Failure: ${error}`);
4301
+ done(error);
4302
+ }
4303
+ }).timeout(attemptTimeout);
4304
+ });
4305
+
4306
+ describe('#addCustomNetworkService - errors', () => {
4307
+ it('should have a addCustomNetworkService function', (done) => {
4308
+ try {
4309
+ assert.equal(true, typeof a.addCustomNetworkService === 'function');
4310
+ done();
4311
+ } catch (error) {
4312
+ log.error(`Test Failure: ${error}`);
4313
+ done(error);
4314
+ }
4315
+ }).timeout(attemptTimeout);
4316
+ });
4317
+
4318
+ describe('#getNetworkServicesLite - errors', () => {
4319
+ it('should have a getNetworkServicesLite function', (done) => {
4320
+ try {
4321
+ assert.equal(true, typeof a.getNetworkServicesLite === 'function');
4322
+ done();
4323
+ } catch (error) {
4324
+ log.error(`Test Failure: ${error}`);
4325
+ done(error);
4326
+ }
4327
+ }).timeout(attemptTimeout);
4328
+ });
4329
+
4330
+ describe('#getNetworkServiceById - errors', () => {
4331
+ it('should have a getNetworkServiceById function', (done) => {
4332
+ try {
4333
+ assert.equal(true, typeof a.getNetworkServiceById === 'function');
4334
+ done();
4335
+ } catch (error) {
4336
+ log.error(`Test Failure: ${error}`);
4337
+ done(error);
4338
+ }
4339
+ }).timeout(attemptTimeout);
4340
+ it('should error if - missing serviceId', (done) => {
4341
+ try {
4342
+ a.getNetworkServiceById(null, null, (data, error) => {
4343
+ try {
4344
+ const displayE = 'serviceId is required';
4345
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getNetworkServiceById', displayE);
4346
+ done();
4347
+ } catch (err) {
4348
+ log.error(`Test Failure: ${err}`);
4349
+ done(err);
4350
+ }
4351
+ });
4352
+ } catch (error) {
4353
+ log.error(`Adapter Exception: ${error}`);
4354
+ done(error);
4355
+ }
4356
+ }).timeout(attemptTimeout);
4357
+ });
4358
+
4359
+ describe('#editNetworkService - errors', () => {
4360
+ it('should have a editNetworkService function', (done) => {
4361
+ try {
4362
+ assert.equal(true, typeof a.editNetworkService === 'function');
4363
+ done();
4364
+ } catch (error) {
4365
+ log.error(`Test Failure: ${error}`);
4366
+ done(error);
4367
+ }
4368
+ }).timeout(attemptTimeout);
4369
+ it('should error if - missing serviceId', (done) => {
4370
+ try {
4371
+ a.editNetworkService(null, (data, error) => {
4372
+ try {
4373
+ const displayE = 'serviceId is required';
4374
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-editNetworkService', displayE);
4375
+ done();
4376
+ } catch (err) {
4377
+ log.error(`Test Failure: ${err}`);
4378
+ done(err);
4379
+ }
4380
+ });
4381
+ } catch (error) {
4382
+ log.error(`Adapter Exception: ${error}`);
4383
+ done(error);
4384
+ }
4385
+ }).timeout(attemptTimeout);
4386
+ });
4387
+
4388
+ describe('#deleteCustomNetworkService - errors', () => {
4389
+ it('should have a deleteCustomNetworkService function', (done) => {
4390
+ try {
4391
+ assert.equal(true, typeof a.deleteCustomNetworkService === 'function');
4392
+ done();
4393
+ } catch (error) {
4394
+ log.error(`Test Failure: ${error}`);
4395
+ done(error);
4396
+ }
4397
+ }).timeout(attemptTimeout);
4398
+ it('should error if - missing serviceId', (done) => {
4399
+ try {
4400
+ a.deleteCustomNetworkService(null, (data, error) => {
4401
+ try {
4402
+ const displayE = 'serviceId is required';
4403
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-deleteCustomNetworkService', displayE);
4404
+ done();
4405
+ } catch (err) {
4406
+ log.error(`Test Failure: ${err}`);
4407
+ done(err);
4408
+ }
4409
+ });
4410
+ } catch (error) {
4411
+ log.error(`Adapter Exception: ${error}`);
4412
+ done(error);
4413
+ }
4414
+ }).timeout(attemptTimeout);
4415
+ });
4416
+
4417
+ describe('#getTimeWindows - errors', () => {
4418
+ it('should have a getTimeWindows function', (done) => {
4419
+ try {
4420
+ assert.equal(true, typeof a.getTimeWindows === 'function');
4421
+ done();
4422
+ } catch (error) {
4423
+ log.error(`Test Failure: ${error}`);
4424
+ done(error);
4425
+ }
4426
+ }).timeout(attemptTimeout);
4427
+ });
4428
+
4429
+ describe('#getTimeWindowSummary - errors', () => {
4430
+ it('should have a getTimeWindowSummary function', (done) => {
4431
+ try {
4432
+ assert.equal(true, typeof a.getTimeWindowSummary === 'function');
4433
+ done();
4434
+ } catch (error) {
4435
+ log.error(`Test Failure: ${error}`);
4436
+ done(error);
4437
+ }
4438
+ }).timeout(attemptTimeout);
4439
+ });
4440
+
4441
+ describe('#getUrlFilteringRules - errors', () => {
4442
+ it('should have a getUrlFilteringRules function', (done) => {
4443
+ try {
4444
+ assert.equal(true, typeof a.getUrlFilteringRules === 'function');
4445
+ done();
4446
+ } catch (error) {
4447
+ log.error(`Test Failure: ${error}`);
4448
+ done(error);
4449
+ }
4450
+ }).timeout(attemptTimeout);
4451
+ });
4452
+
4453
+ describe('#postUrlFilteringRules - errors', () => {
4454
+ it('should have a postUrlFilteringRules function', (done) => {
4455
+ try {
4456
+ assert.equal(true, typeof a.postUrlFilteringRules === 'function');
4457
+ done();
4458
+ } catch (error) {
4459
+ log.error(`Test Failure: ${error}`);
4460
+ done(error);
4461
+ }
4462
+ }).timeout(attemptTimeout);
4463
+ });
4464
+
4465
+ describe('#getUrlFilteringRulesRuleId - errors', () => {
4466
+ it('should have a getUrlFilteringRulesRuleId function', (done) => {
4467
+ try {
4468
+ assert.equal(true, typeof a.getUrlFilteringRulesRuleId === 'function');
4469
+ done();
4470
+ } catch (error) {
4471
+ log.error(`Test Failure: ${error}`);
4472
+ done(error);
4473
+ }
4474
+ }).timeout(attemptTimeout);
4475
+ it('should error if - missing ruleId', (done) => {
4476
+ try {
4477
+ a.getUrlFilteringRulesRuleId(null, (data, error) => {
4478
+ try {
4479
+ const displayE = 'ruleId is required';
4480
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getUrlFilteringRulesRuleId', displayE);
4481
+ done();
4482
+ } catch (err) {
4483
+ log.error(`Test Failure: ${err}`);
4484
+ done(err);
4485
+ }
4486
+ });
4487
+ } catch (error) {
4488
+ log.error(`Adapter Exception: ${error}`);
4489
+ done(error);
4490
+ }
4491
+ }).timeout(attemptTimeout);
4492
+ });
4493
+
4494
+ describe('#putUrlFilteringRulesRuleId - errors', () => {
4495
+ it('should have a putUrlFilteringRulesRuleId function', (done) => {
4496
+ try {
4497
+ assert.equal(true, typeof a.putUrlFilteringRulesRuleId === 'function');
4498
+ done();
4499
+ } catch (error) {
4500
+ log.error(`Test Failure: ${error}`);
4501
+ done(error);
4502
+ }
4503
+ }).timeout(attemptTimeout);
4504
+ it('should error if - missing ruleId', (done) => {
4505
+ try {
4506
+ a.putUrlFilteringRulesRuleId(null, null, (data, error) => {
4507
+ try {
4508
+ const displayE = 'ruleId is required';
4509
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-putUrlFilteringRulesRuleId', displayE);
4510
+ done();
4511
+ } catch (err) {
4512
+ log.error(`Test Failure: ${err}`);
4513
+ done(err);
4514
+ }
4515
+ });
4516
+ } catch (error) {
4517
+ log.error(`Adapter Exception: ${error}`);
4518
+ done(error);
4519
+ }
4520
+ }).timeout(attemptTimeout);
4521
+ });
4522
+
4523
+ describe('#deleteUrlFilteringRulesRuleId - errors', () => {
4524
+ it('should have a deleteUrlFilteringRulesRuleId function', (done) => {
4525
+ try {
4526
+ assert.equal(true, typeof a.deleteUrlFilteringRulesRuleId === 'function');
4527
+ done();
4528
+ } catch (error) {
4529
+ log.error(`Test Failure: ${error}`);
4530
+ done(error);
4531
+ }
4532
+ }).timeout(attemptTimeout);
4533
+ it('should error if - missing ruleId', (done) => {
4534
+ try {
4535
+ a.deleteUrlFilteringRulesRuleId(null, (data, error) => {
4536
+ try {
4537
+ const displayE = 'ruleId is required';
4538
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-deleteUrlFilteringRulesRuleId', displayE);
4539
+ done();
4540
+ } catch (err) {
4541
+ log.error(`Test Failure: ${err}`);
4542
+ done(err);
4543
+ }
4544
+ });
4545
+ } catch (error) {
4546
+ log.error(`Adapter Exception: ${error}`);
4547
+ done(error);
4548
+ }
4549
+ }).timeout(attemptTimeout);
4550
+ });
4551
+
4552
+ describe('#getForwardingRules - errors', () => {
4553
+ it('should have a getForwardingRules function', (done) => {
4554
+ try {
4555
+ assert.equal(true, typeof a.getForwardingRules === 'function');
4556
+ done();
4557
+ } catch (error) {
4558
+ log.error(`Test Failure: ${error}`);
4559
+ done(error);
4560
+ }
4561
+ }).timeout(attemptTimeout);
4562
+ });
4563
+
4564
+ describe('#createForwardingRule - errors', () => {
4565
+ it('should have a createForwardingRule function', (done) => {
4566
+ try {
4567
+ assert.equal(true, typeof a.createForwardingRule === 'function');
4568
+ done();
4569
+ } catch (error) {
4570
+ log.error(`Test Failure: ${error}`);
4571
+ done(error);
4572
+ }
4573
+ }).timeout(attemptTimeout);
4574
+ });
4575
+
4576
+ describe('#getForwardingRule - errors', () => {
4577
+ it('should have a getForwardingRule function', (done) => {
4578
+ try {
4579
+ assert.equal(true, typeof a.getForwardingRule === 'function');
4580
+ done();
4581
+ } catch (error) {
4582
+ log.error(`Test Failure: ${error}`);
4583
+ done(error);
4584
+ }
4585
+ }).timeout(attemptTimeout);
4586
+ it('should error if - missing ruleId', (done) => {
4587
+ try {
4588
+ a.getForwardingRule(null, (data, error) => {
4589
+ try {
4590
+ const displayE = 'ruleId is required';
4591
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getForwardingRule', displayE);
4592
+ done();
4593
+ } catch (err) {
4594
+ log.error(`Test Failure: ${err}`);
4595
+ done(err);
4596
+ }
4597
+ });
4598
+ } catch (error) {
4599
+ log.error(`Adapter Exception: ${error}`);
4600
+ done(error);
4601
+ }
4602
+ }).timeout(attemptTimeout);
4603
+ });
4604
+
4605
+ describe('#updateForwardingRule - errors', () => {
4606
+ it('should have a updateForwardingRule function', (done) => {
4607
+ try {
4608
+ assert.equal(true, typeof a.updateForwardingRule === 'function');
4609
+ done();
4610
+ } catch (error) {
4611
+ log.error(`Test Failure: ${error}`);
4612
+ done(error);
4613
+ }
4614
+ }).timeout(attemptTimeout);
4615
+ it('should error if - missing ruleId', (done) => {
4616
+ try {
4617
+ a.updateForwardingRule(null, null, (data, error) => {
4618
+ try {
4619
+ const displayE = 'ruleId is required';
4620
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-updateForwardingRule', displayE);
4621
+ done();
4622
+ } catch (err) {
4623
+ log.error(`Test Failure: ${err}`);
4624
+ done(err);
4625
+ }
4626
+ });
4627
+ } catch (error) {
4628
+ log.error(`Adapter Exception: ${error}`);
4629
+ done(error);
4630
+ }
4631
+ }).timeout(attemptTimeout);
4632
+ });
4633
+
4634
+ describe('#deleteForwardingRule - errors', () => {
4635
+ it('should have a deleteForwardingRule function', (done) => {
4636
+ try {
4637
+ assert.equal(true, typeof a.deleteForwardingRule === 'function');
4638
+ done();
4639
+ } catch (error) {
4640
+ log.error(`Test Failure: ${error}`);
4641
+ done(error);
4642
+ }
4643
+ }).timeout(attemptTimeout);
4644
+ it('should error if - missing ruleId', (done) => {
4645
+ try {
4646
+ a.deleteForwardingRule(null, (data, error) => {
4647
+ try {
4648
+ const displayE = 'ruleId is required';
4649
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-deleteForwardingRule', displayE);
4650
+ done();
4651
+ } catch (err) {
4652
+ log.error(`Test Failure: ${err}`);
4653
+ done(err);
4654
+ }
4655
+ });
4656
+ } catch (error) {
4657
+ log.error(`Adapter Exception: ${error}`);
4658
+ done(error);
4659
+ }
4660
+ }).timeout(attemptTimeout);
4661
+ });
4662
+
4663
+ describe('#getZpaGateways - errors', () => {
4664
+ it('should have a getZpaGateways function', (done) => {
4665
+ try {
4666
+ assert.equal(true, typeof a.getZpaGateways === 'function');
4667
+ done();
4668
+ } catch (error) {
4669
+ log.error(`Test Failure: ${error}`);
4670
+ done(error);
4671
+ }
4672
+ }).timeout(attemptTimeout);
4673
+ });
4674
+
4675
+ describe('#addZpaGateway - errors', () => {
4676
+ it('should have a addZpaGateway function', (done) => {
4677
+ try {
4678
+ assert.equal(true, typeof a.addZpaGateway === 'function');
4679
+ done();
4680
+ } catch (error) {
4681
+ log.error(`Test Failure: ${error}`);
4682
+ done(error);
4683
+ }
4684
+ }).timeout(attemptTimeout);
4685
+ });
4686
+
4687
+ describe('#getZpaGatewayById - errors', () => {
4688
+ it('should have a getZpaGatewayById function', (done) => {
4689
+ try {
4690
+ assert.equal(true, typeof a.getZpaGatewayById === 'function');
4691
+ done();
4692
+ } catch (error) {
4693
+ log.error(`Test Failure: ${error}`);
4694
+ done(error);
4695
+ }
4696
+ }).timeout(attemptTimeout);
4697
+ it('should error if - missing gatewayId', (done) => {
4698
+ try {
4699
+ a.getZpaGatewayById(null, (data, error) => {
4700
+ try {
4701
+ const displayE = 'gatewayId is required';
4702
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getZpaGatewayById', displayE);
4703
+ done();
4704
+ } catch (err) {
4705
+ log.error(`Test Failure: ${err}`);
4706
+ done(err);
4707
+ }
4708
+ });
4709
+ } catch (error) {
4710
+ log.error(`Adapter Exception: ${error}`);
4711
+ done(error);
4712
+ }
4713
+ }).timeout(attemptTimeout);
4714
+ });
4715
+
4716
+ describe('#editZpaGateway - errors', () => {
4717
+ it('should have a editZpaGateway function', (done) => {
4718
+ try {
4719
+ assert.equal(true, typeof a.editZpaGateway === 'function');
4720
+ done();
4721
+ } catch (error) {
4722
+ log.error(`Test Failure: ${error}`);
4723
+ done(error);
4724
+ }
4725
+ }).timeout(attemptTimeout);
4726
+ it('should error if - missing gatewayId', (done) => {
4727
+ try {
4728
+ a.editZpaGateway(null, null, (data, error) => {
4729
+ try {
4730
+ const displayE = 'gatewayId is required';
4731
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-editZpaGateway', displayE);
4732
+ done();
4733
+ } catch (err) {
4734
+ log.error(`Test Failure: ${err}`);
4735
+ done(err);
4736
+ }
4737
+ });
4738
+ } catch (error) {
4739
+ log.error(`Adapter Exception: ${error}`);
4740
+ done(error);
4741
+ }
4742
+ }).timeout(attemptTimeout);
4743
+ });
4744
+
4745
+ describe('#deleteZpaGateway - errors', () => {
4746
+ it('should have a deleteZpaGateway function', (done) => {
4747
+ try {
4748
+ assert.equal(true, typeof a.deleteZpaGateway === 'function');
4749
+ done();
4750
+ } catch (error) {
4751
+ log.error(`Test Failure: ${error}`);
4752
+ done(error);
4753
+ }
4754
+ }).timeout(attemptTimeout);
4755
+ it('should error if - missing gatewayId', (done) => {
4756
+ try {
4757
+ a.deleteZpaGateway(null, (data, error) => {
4758
+ try {
4759
+ const displayE = 'gatewayId is required';
4760
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-deleteZpaGateway', displayE);
4761
+ done();
4762
+ } catch (err) {
4763
+ log.error(`Test Failure: ${err}`);
4764
+ done(err);
4765
+ }
4766
+ });
4767
+ } catch (error) {
4768
+ log.error(`Adapter Exception: ${error}`);
4769
+ done(error);
4770
+ }
4771
+ }).timeout(attemptTimeout);
4772
+ });
4773
+
4774
+ describe('#getIntermediateCaCertificates - errors', () => {
4775
+ it('should have a getIntermediateCaCertificates function', (done) => {
4776
+ try {
4777
+ assert.equal(true, typeof a.getIntermediateCaCertificates === 'function');
4778
+ done();
4779
+ } catch (error) {
4780
+ log.error(`Test Failure: ${error}`);
4781
+ done(error);
4782
+ }
4783
+ }).timeout(attemptTimeout);
4784
+ });
4785
+
4786
+ describe('#addIntermediateCaCertificate - errors', () => {
4787
+ it('should have a addIntermediateCaCertificate function', (done) => {
4788
+ try {
4789
+ assert.equal(true, typeof a.addIntermediateCaCertificate === 'function');
4790
+ done();
4791
+ } catch (error) {
4792
+ log.error(`Test Failure: ${error}`);
4793
+ done(error);
4794
+ }
4795
+ }).timeout(attemptTimeout);
4796
+ });
4797
+
4798
+ describe('#downloadAttestationStmt - errors', () => {
4799
+ it('should have a downloadAttestationStmt function', (done) => {
4800
+ try {
4801
+ assert.equal(true, typeof a.downloadAttestationStmt === 'function');
4802
+ done();
4803
+ } catch (error) {
4804
+ log.error(`Test Failure: ${error}`);
4805
+ done(error);
4806
+ }
4807
+ }).timeout(attemptTimeout);
4808
+ it('should error if - missing certId', (done) => {
4809
+ try {
4810
+ a.downloadAttestationStmt(null, (data, error) => {
4811
+ try {
4812
+ const displayE = 'certId is required';
4813
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-downloadAttestationStmt', displayE);
4814
+ done();
4815
+ } catch (err) {
4816
+ log.error(`Test Failure: ${err}`);
4817
+ done(err);
4818
+ }
4819
+ });
4820
+ } catch (error) {
4821
+ log.error(`Adapter Exception: ${error}`);
4822
+ done(error);
4823
+ }
4824
+ }).timeout(attemptTimeout);
4825
+ });
4826
+
4827
+ describe('#downloadCSR - errors', () => {
4828
+ it('should have a downloadCSR function', (done) => {
4829
+ try {
4830
+ assert.equal(true, typeof a.downloadCSR === 'function');
4831
+ done();
4832
+ } catch (error) {
4833
+ log.error(`Test Failure: ${error}`);
4834
+ done(error);
4835
+ }
4836
+ }).timeout(attemptTimeout);
4837
+ it('should error if - missing certId', (done) => {
4838
+ try {
4839
+ a.downloadCSR(null, (data, error) => {
4840
+ try {
4841
+ const displayE = 'certId is required';
4842
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-downloadCSR', displayE);
4843
+ done();
4844
+ } catch (err) {
4845
+ log.error(`Test Failure: ${err}`);
4846
+ done(err);
4847
+ }
4848
+ });
4849
+ } catch (error) {
4850
+ log.error(`Adapter Exception: ${error}`);
4851
+ done(error);
4852
+ }
4853
+ }).timeout(attemptTimeout);
4854
+ });
4855
+
4856
+ describe('#downloadHsmPublicKey - errors', () => {
4857
+ it('should have a downloadHsmPublicKey function', (done) => {
4858
+ try {
4859
+ assert.equal(true, typeof a.downloadHsmPublicKey === 'function');
4860
+ done();
4861
+ } catch (error) {
4862
+ log.error(`Test Failure: ${error}`);
4863
+ done(error);
4864
+ }
4865
+ }).timeout(attemptTimeout);
4866
+ it('should error if - missing certId', (done) => {
4867
+ try {
4868
+ a.downloadHsmPublicKey(null, (data, error) => {
4869
+ try {
4870
+ const displayE = 'certId is required';
4871
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-downloadHsmPublicKey', displayE);
4872
+ done();
4873
+ } catch (err) {
4874
+ log.error(`Test Failure: ${err}`);
4875
+ done(err);
4876
+ }
4877
+ });
4878
+ } catch (error) {
4879
+ log.error(`Adapter Exception: ${error}`);
4880
+ done(error);
4881
+ }
4882
+ }).timeout(attemptTimeout);
4883
+ });
4884
+
4885
+ describe('#finalizeCert - errors', () => {
4886
+ it('should have a finalizeCert function', (done) => {
4887
+ try {
4888
+ assert.equal(true, typeof a.finalizeCert === 'function');
4889
+ done();
4890
+ } catch (error) {
4891
+ log.error(`Test Failure: ${error}`);
4892
+ done(error);
4893
+ }
4894
+ }).timeout(attemptTimeout);
4895
+ it('should error if - missing certId', (done) => {
4896
+ try {
4897
+ a.finalizeCert(null, (data, error) => {
4898
+ try {
4899
+ const displayE = 'certId is required';
4900
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-finalizeCert', displayE);
4901
+ done();
4902
+ } catch (err) {
4903
+ log.error(`Test Failure: ${err}`);
4904
+ done(err);
4905
+ }
4906
+ });
4907
+ } catch (error) {
4908
+ log.error(`Adapter Exception: ${error}`);
4909
+ done(error);
4910
+ }
4911
+ }).timeout(attemptTimeout);
4912
+ });
4913
+
4914
+ describe('#generateCsr - errors', () => {
4915
+ it('should have a generateCsr function', (done) => {
4916
+ try {
4917
+ assert.equal(true, typeof a.generateCsr === 'function');
4918
+ done();
4919
+ } catch (error) {
4920
+ log.error(`Test Failure: ${error}`);
4921
+ done(error);
4922
+ }
4923
+ }).timeout(attemptTimeout);
4924
+ it('should error if - missing certId', (done) => {
4925
+ try {
4926
+ a.generateCsr(null, null, (data, error) => {
4927
+ try {
4928
+ const displayE = 'certId is required';
4929
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-generateCsr', displayE);
4930
+ done();
4931
+ } catch (err) {
4932
+ log.error(`Test Failure: ${err}`);
4933
+ done(err);
4934
+ }
4935
+ });
4936
+ } catch (error) {
4937
+ log.error(`Adapter Exception: ${error}`);
4938
+ done(error);
4939
+ }
4940
+ }).timeout(attemptTimeout);
4941
+ it('should error if - missing body', (done) => {
4942
+ try {
4943
+ a.generateCsr('fakeparam', null, (data, error) => {
4944
+ try {
4945
+ const displayE = 'body is required';
4946
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-generateCsr', displayE);
4947
+ done();
4948
+ } catch (err) {
4949
+ log.error(`Test Failure: ${err}`);
4950
+ done(err);
4951
+ }
4952
+ });
4953
+ } catch (error) {
4954
+ log.error(`Adapter Exception: ${error}`);
4955
+ done(error);
4956
+ }
4957
+ }).timeout(attemptTimeout);
4958
+ });
4959
+
4960
+ describe('#generateHsmKeyPair - errors', () => {
4961
+ it('should have a generateHsmKeyPair function', (done) => {
4962
+ try {
4963
+ assert.equal(true, typeof a.generateHsmKeyPair === 'function');
4964
+ done();
4965
+ } catch (error) {
4966
+ log.error(`Test Failure: ${error}`);
4967
+ done(error);
4968
+ }
4969
+ }).timeout(attemptTimeout);
4970
+ it('should error if - missing certId', (done) => {
4971
+ try {
4972
+ a.generateHsmKeyPair(null, (data, error) => {
4973
+ try {
4974
+ const displayE = 'certId is required';
4975
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-generateHsmKeyPair', displayE);
4976
+ done();
4977
+ } catch (err) {
4978
+ log.error(`Test Failure: ${err}`);
4979
+ done(err);
4980
+ }
4981
+ });
4982
+ } catch (error) {
4983
+ log.error(`Adapter Exception: ${error}`);
4984
+ done(error);
4985
+ }
4986
+ }).timeout(attemptTimeout);
4987
+ });
4988
+
4989
+ describe('#getIntermediateCaCertificatesLite - errors', () => {
4990
+ it('should have a getIntermediateCaCertificatesLite function', (done) => {
4991
+ try {
4992
+ assert.equal(true, typeof a.getIntermediateCaCertificatesLite === 'function');
4993
+ done();
4994
+ } catch (error) {
4995
+ log.error(`Test Failure: ${error}`);
4996
+ done(error);
4997
+ }
4998
+ }).timeout(attemptTimeout);
4999
+ });
5000
+
5001
+ describe('#getIntermediateCaCertificateLite - errors', () => {
5002
+ it('should have a getIntermediateCaCertificateLite function', (done) => {
5003
+ try {
5004
+ assert.equal(true, typeof a.getIntermediateCaCertificateLite === 'function');
5005
+ done();
5006
+ } catch (error) {
5007
+ log.error(`Test Failure: ${error}`);
5008
+ done(error);
5009
+ }
5010
+ }).timeout(attemptTimeout);
5011
+ it('should error if - missing certId', (done) => {
5012
+ try {
5013
+ a.getIntermediateCaCertificateLite(null, (data, error) => {
5014
+ try {
5015
+ const displayE = 'certId is required';
5016
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getIntermediateCaCertificateLite', displayE);
5017
+ done();
5018
+ } catch (err) {
5019
+ log.error(`Test Failure: ${err}`);
5020
+ done(err);
5021
+ }
5022
+ });
5023
+ } catch (error) {
5024
+ log.error(`Adapter Exception: ${error}`);
5025
+ done(error);
5026
+ }
5027
+ }).timeout(attemptTimeout);
5028
+ });
5029
+
5030
+ describe('#makeDefaultCertificate - errors', () => {
5031
+ it('should have a makeDefaultCertificate function', (done) => {
5032
+ try {
5033
+ assert.equal(true, typeof a.makeDefaultCertificate === 'function');
5034
+ done();
5035
+ } catch (error) {
5036
+ log.error(`Test Failure: ${error}`);
5037
+ done(error);
5038
+ }
5039
+ }).timeout(attemptTimeout);
5040
+ it('should error if - missing certId', (done) => {
5041
+ try {
5042
+ a.makeDefaultCertificate(null, (data, error) => {
5043
+ try {
5044
+ const displayE = 'certId is required';
5045
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-makeDefaultCertificate', displayE);
5046
+ done();
5047
+ } catch (err) {
5048
+ log.error(`Test Failure: ${err}`);
5049
+ done(err);
5050
+ }
5051
+ });
5052
+ } catch (error) {
5053
+ log.error(`Adapter Exception: ${error}`);
5054
+ done(error);
5055
+ }
5056
+ }).timeout(attemptTimeout);
5057
+ });
5058
+
5059
+ describe('#getCertificatesInReadyToUseState - errors', () => {
5060
+ it('should have a getCertificatesInReadyToUseState function', (done) => {
5061
+ try {
5062
+ assert.equal(true, typeof a.getCertificatesInReadyToUseState === 'function');
5063
+ done();
5064
+ } catch (error) {
5065
+ log.error(`Test Failure: ${error}`);
5066
+ done(error);
5067
+ }
5068
+ }).timeout(attemptTimeout);
5069
+ });
5070
+
5071
+ describe('#showCert - errors', () => {
5072
+ it('should have a showCert function', (done) => {
5073
+ try {
5074
+ assert.equal(true, typeof a.showCert === 'function');
5075
+ done();
5076
+ } catch (error) {
5077
+ log.error(`Test Failure: ${error}`);
5078
+ done(error);
5079
+ }
5080
+ }).timeout(attemptTimeout);
5081
+ it('should error if - missing certId', (done) => {
5082
+ try {
5083
+ a.showCert(null, (data, error) => {
5084
+ try {
5085
+ const displayE = 'certId is required';
5086
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-showCert', displayE);
5087
+ done();
5088
+ } catch (err) {
5089
+ log.error(`Test Failure: ${err}`);
5090
+ done(err);
5091
+ }
5092
+ });
5093
+ } catch (error) {
5094
+ log.error(`Adapter Exception: ${error}`);
5095
+ done(error);
5096
+ }
5097
+ }).timeout(attemptTimeout);
5098
+ });
5099
+
5100
+ describe('#showCsr - errors', () => {
5101
+ it('should have a showCsr function', (done) => {
5102
+ try {
5103
+ assert.equal(true, typeof a.showCsr === 'function');
5104
+ done();
5105
+ } catch (error) {
5106
+ log.error(`Test Failure: ${error}`);
5107
+ done(error);
5108
+ }
5109
+ }).timeout(attemptTimeout);
5110
+ it('should error if - missing certId', (done) => {
5111
+ try {
5112
+ a.showCsr(null, (data, error) => {
5113
+ try {
5114
+ const displayE = 'certId is required';
5115
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-showCsr', displayE);
5116
+ done();
5117
+ } catch (err) {
5118
+ log.error(`Test Failure: ${err}`);
5119
+ done(err);
5120
+ }
5121
+ });
5122
+ } catch (error) {
5123
+ log.error(`Adapter Exception: ${error}`);
5124
+ done(error);
5125
+ }
5126
+ }).timeout(attemptTimeout);
5127
+ });
5128
+
5129
+ describe('#uploadCert - errors', () => {
5130
+ it('should have a uploadCert function', (done) => {
5131
+ try {
5132
+ assert.equal(true, typeof a.uploadCert === 'function');
5133
+ done();
5134
+ } catch (error) {
5135
+ log.error(`Test Failure: ${error}`);
5136
+ done(error);
5137
+ }
5138
+ }).timeout(attemptTimeout);
5139
+ it('should error if - missing certId', (done) => {
5140
+ try {
5141
+ a.uploadCert(null, null, (data, error) => {
5142
+ try {
5143
+ const displayE = 'certId is required';
5144
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-uploadCert', displayE);
5145
+ done();
5146
+ } catch (err) {
5147
+ log.error(`Test Failure: ${err}`);
5148
+ done(err);
5149
+ }
5150
+ });
5151
+ } catch (error) {
5152
+ log.error(`Adapter Exception: ${error}`);
5153
+ done(error);
5154
+ }
5155
+ }).timeout(attemptTimeout);
5156
+ });
5157
+
5158
+ describe('#uploadCertChain - errors', () => {
5159
+ it('should have a uploadCertChain function', (done) => {
5160
+ try {
5161
+ assert.equal(true, typeof a.uploadCertChain === 'function');
5162
+ done();
5163
+ } catch (error) {
5164
+ log.error(`Test Failure: ${error}`);
5165
+ done(error);
5166
+ }
5167
+ }).timeout(attemptTimeout);
5168
+ it('should error if - missing certId', (done) => {
5169
+ try {
5170
+ a.uploadCertChain(null, null, (data, error) => {
5171
+ try {
5172
+ const displayE = 'certId is required';
5173
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-uploadCertChain', displayE);
5174
+ done();
5175
+ } catch (err) {
5176
+ log.error(`Test Failure: ${err}`);
5177
+ done(err);
5178
+ }
5179
+ });
5180
+ } catch (error) {
5181
+ log.error(`Adapter Exception: ${error}`);
5182
+ done(error);
5183
+ }
5184
+ }).timeout(attemptTimeout);
5185
+ });
5186
+
5187
+ describe('#verifyKeyAttestation - errors', () => {
5188
+ it('should have a verifyKeyAttestation function', (done) => {
5189
+ try {
5190
+ assert.equal(true, typeof a.verifyKeyAttestation === 'function');
5191
+ done();
5192
+ } catch (error) {
5193
+ log.error(`Test Failure: ${error}`);
5194
+ done(error);
5195
+ }
5196
+ }).timeout(attemptTimeout);
5197
+ it('should error if - missing certId', (done) => {
5198
+ try {
5199
+ a.verifyKeyAttestation(null, (data, error) => {
5200
+ try {
5201
+ const displayE = 'certId is required';
5202
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-verifyKeyAttestation', displayE);
5203
+ done();
5204
+ } catch (err) {
5205
+ log.error(`Test Failure: ${err}`);
5206
+ done(err);
5207
+ }
5208
+ });
5209
+ } catch (error) {
5210
+ log.error(`Adapter Exception: ${error}`);
5211
+ done(error);
5212
+ }
5213
+ }).timeout(attemptTimeout);
5214
+ });
5215
+
5216
+ describe('#getIntermediateCaCertificate - errors', () => {
5217
+ it('should have a getIntermediateCaCertificate function', (done) => {
5218
+ try {
5219
+ assert.equal(true, typeof a.getIntermediateCaCertificate === 'function');
5220
+ done();
5221
+ } catch (error) {
5222
+ log.error(`Test Failure: ${error}`);
5223
+ done(error);
5224
+ }
5225
+ }).timeout(attemptTimeout);
5226
+ it('should error if - missing certId', (done) => {
5227
+ try {
5228
+ a.getIntermediateCaCertificate(null, (data, error) => {
5229
+ try {
5230
+ const displayE = 'certId is required';
5231
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getIntermediateCaCertificate', displayE);
5232
+ done();
5233
+ } catch (err) {
5234
+ log.error(`Test Failure: ${err}`);
5235
+ done(err);
5236
+ }
5237
+ });
5238
+ } catch (error) {
5239
+ log.error(`Adapter Exception: ${error}`);
5240
+ done(error);
5241
+ }
5242
+ }).timeout(attemptTimeout);
5243
+ });
5244
+
5245
+ describe('#updateIntermediateCaCertificate - errors', () => {
5246
+ it('should have a updateIntermediateCaCertificate function', (done) => {
5247
+ try {
5248
+ assert.equal(true, typeof a.updateIntermediateCaCertificate === 'function');
5249
+ done();
5250
+ } catch (error) {
5251
+ log.error(`Test Failure: ${error}`);
5252
+ done(error);
5253
+ }
5254
+ }).timeout(attemptTimeout);
5255
+ it('should error if - missing certId', (done) => {
5256
+ try {
5257
+ a.updateIntermediateCaCertificate(null, null, (data, error) => {
5258
+ try {
5259
+ const displayE = 'certId is required';
5260
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-updateIntermediateCaCertificate', displayE);
5261
+ done();
5262
+ } catch (err) {
5263
+ log.error(`Test Failure: ${err}`);
5264
+ done(err);
5265
+ }
5266
+ });
5267
+ } catch (error) {
5268
+ log.error(`Adapter Exception: ${error}`);
5269
+ done(error);
5270
+ }
5271
+ }).timeout(attemptTimeout);
5272
+ });
5273
+
5274
+ describe('#deleteIntermediateCaCertificate - errors', () => {
5275
+ it('should have a deleteIntermediateCaCertificate function', (done) => {
5276
+ try {
5277
+ assert.equal(true, typeof a.deleteIntermediateCaCertificate === 'function');
5278
+ done();
5279
+ } catch (error) {
5280
+ log.error(`Test Failure: ${error}`);
5281
+ done(error);
5282
+ }
5283
+ }).timeout(attemptTimeout);
5284
+ it('should error if - missing certId', (done) => {
5285
+ try {
5286
+ a.deleteIntermediateCaCertificate(null, (data, error) => {
5287
+ try {
5288
+ const displayE = 'certId is required';
5289
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-deleteIntermediateCaCertificate', displayE);
5290
+ done();
5291
+ } catch (err) {
5292
+ log.error(`Test Failure: ${err}`);
5293
+ done(err);
5294
+ }
5295
+ });
5296
+ } catch (error) {
5297
+ log.error(`Adapter Exception: ${error}`);
5298
+ done(error);
5299
+ }
5300
+ }).timeout(attemptTimeout);
5301
+ });
5302
+
5303
+ describe('#getSslExemptedUrls - errors', () => {
5304
+ it('should have a getSslExemptedUrls function', (done) => {
5305
+ try {
5306
+ assert.equal(true, typeof a.getSslExemptedUrls === 'function');
5307
+ done();
5308
+ } catch (error) {
5309
+ log.error(`Test Failure: ${error}`);
5310
+ done(error);
5311
+ }
5312
+ }).timeout(attemptTimeout);
5313
+ });
5314
+
5315
+ describe('#updateSslExemptedUrls - errors', () => {
5316
+ it('should have a updateSslExemptedUrls function', (done) => {
5317
+ try {
5318
+ assert.equal(true, typeof a.updateSslExemptedUrls === 'function');
5319
+ done();
5320
+ } catch (error) {
5321
+ log.error(`Test Failure: ${error}`);
5322
+ done(error);
5323
+ }
5324
+ }).timeout(attemptTimeout);
5325
+ it('should error if - missing action', (done) => {
5326
+ try {
5327
+ a.updateSslExemptedUrls(null, (data, error) => {
5328
+ try {
5329
+ const displayE = 'action is required';
5330
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-updateSslExemptedUrls', displayE);
5331
+ done();
5332
+ } catch (err) {
5333
+ log.error(`Test Failure: ${err}`);
5334
+ done(err);
5335
+ }
5336
+ });
5337
+ } catch (error) {
5338
+ log.error(`Adapter Exception: ${error}`);
5339
+ done(error);
5340
+ }
5341
+ }).timeout(attemptTimeout);
5342
+ });
5343
+
5344
+ describe('#getDeviceTypes - errors', () => {
5345
+ it('should have a getDeviceTypes function', (done) => {
5346
+ try {
5347
+ assert.equal(true, typeof a.getDeviceTypes === 'function');
5348
+ done();
5349
+ } catch (error) {
5350
+ log.error(`Test Failure: ${error}`);
5351
+ done(error);
5352
+ }
5353
+ }).timeout(attemptTimeout);
5354
+ });
5355
+
5356
+ describe('#getCategories - errors', () => {
5357
+ it('should have a getCategories function', (done) => {
5358
+ try {
5359
+ assert.equal(true, typeof a.getCategories === 'function');
5360
+ done();
5361
+ } catch (error) {
5362
+ log.error(`Test Failure: ${error}`);
5363
+ done(error);
5364
+ }
5365
+ }).timeout(attemptTimeout);
5366
+ });
5367
+
5368
+ describe('#getClassifications - errors', () => {
5369
+ it('should have a getClassifications function', (done) => {
5370
+ try {
5371
+ assert.equal(true, typeof a.getClassifications === 'function');
5372
+ done();
5373
+ } catch (error) {
5374
+ log.error(`Test Failure: ${error}`);
5375
+ done(error);
5376
+ }
5377
+ }).timeout(attemptTimeout);
5378
+ });
5379
+
5380
+ describe('#getDeviceList - errors', () => {
5381
+ it('should have a getDeviceList function', (done) => {
5382
+ try {
5383
+ assert.equal(true, typeof a.getDeviceList === 'function');
5384
+ done();
5385
+ } catch (error) {
5386
+ log.error(`Test Failure: ${error}`);
5387
+ done(error);
5388
+ }
5389
+ }).timeout(attemptTimeout);
5390
+ });
5391
+
5392
+ describe('#getSubLocations - errors', () => {
5393
+ it('should have a getSubLocations function', (done) => {
5394
+ try {
5395
+ assert.equal(true, typeof a.getSubLocations === 'function');
5396
+ done();
5397
+ } catch (error) {
5398
+ log.error(`Test Failure: ${error}`);
5399
+ done(error);
5400
+ }
5401
+ }).timeout(attemptTimeout);
5402
+ it('should error if - missing locationId', (done) => {
5403
+ try {
5404
+ a.getSubLocations(null, null, null, null, null, null, null, null, null, (data, error) => {
5405
+ try {
5406
+ const displayE = 'locationId is required';
5407
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getSubLocations', displayE);
5408
+ done();
5409
+ } catch (err) {
5410
+ log.error(`Test Failure: ${err}`);
5411
+ done(err);
5412
+ }
5413
+ });
5414
+ } catch (error) {
5415
+ log.error(`Adapter Exception: ${error}`);
5416
+ done(error);
5417
+ }
5418
+ }).timeout(attemptTimeout);
5419
+ });
5420
+
5421
+ describe('#getGroupsCount - errors', () => {
5422
+ it('should have a getGroupsCount function', (done) => {
5423
+ try {
5424
+ assert.equal(true, typeof a.getGroupsCount === 'function');
5425
+ done();
5426
+ } catch (error) {
5427
+ log.error(`Test Failure: ${error}`);
5428
+ done(error);
5429
+ }
5430
+ }).timeout(attemptTimeout);
5431
+ });
5432
+
5433
+ describe('#getGroupsSummary - errors', () => {
5434
+ it('should have a getGroupsSummary function', (done) => {
5435
+ try {
5436
+ assert.equal(true, typeof a.getGroupsSummary === 'function');
5437
+ done();
5438
+ } catch (error) {
5439
+ log.error(`Test Failure: ${error}`);
5440
+ done(error);
5441
+ }
5442
+ }).timeout(attemptTimeout);
5443
+ });
5444
+
5445
+ describe('#getGroupSummary - errors', () => {
5446
+ it('should have a getGroupSummary function', (done) => {
5447
+ try {
5448
+ assert.equal(true, typeof a.getGroupSummary === 'function');
5449
+ done();
5450
+ } catch (error) {
5451
+ log.error(`Test Failure: ${error}`);
5452
+ done(error);
5453
+ }
5454
+ }).timeout(attemptTimeout);
5455
+ it('should error if - missing id', (done) => {
5456
+ try {
5457
+ a.getGroupSummary(null, (data, error) => {
5458
+ try {
5459
+ const displayE = 'id is required';
5460
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getGroupSummary', displayE);
5461
+ done();
5462
+ } catch (err) {
5463
+ log.error(`Test Failure: ${err}`);
5464
+ done(err);
5465
+ }
5466
+ });
5467
+ } catch (error) {
5468
+ log.error(`Adapter Exception: ${error}`);
5469
+ done(error);
5470
+ }
5471
+ }).timeout(attemptTimeout);
5472
+ });
5473
+
5474
+ describe('#getGroupById - errors', () => {
5475
+ it('should have a getGroupById function', (done) => {
5476
+ try {
5477
+ assert.equal(true, typeof a.getGroupById === 'function');
5478
+ done();
5479
+ } catch (error) {
5480
+ log.error(`Test Failure: ${error}`);
5481
+ done(error);
5482
+ }
5483
+ }).timeout(attemptTimeout);
5484
+ it('should error if - missing id', (done) => {
5485
+ try {
5486
+ a.getGroupById(null, (data, error) => {
5487
+ try {
5488
+ const displayE = 'id is required';
5489
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getGroupById', displayE);
5490
+ done();
5491
+ } catch (err) {
5492
+ log.error(`Test Failure: ${err}`);
5493
+ done(err);
5494
+ }
5495
+ });
5496
+ } catch (error) {
5497
+ log.error(`Adapter Exception: ${error}`);
5498
+ done(error);
5499
+ }
5500
+ }).timeout(attemptTimeout);
5501
+ });
5502
+
5503
+ describe('#getRuleLabels - errors', () => {
5504
+ it('should have a getRuleLabels function', (done) => {
5505
+ try {
5506
+ assert.equal(true, typeof a.getRuleLabels === 'function');
5507
+ done();
5508
+ } catch (error) {
5509
+ log.error(`Test Failure: ${error}`);
5510
+ done(error);
5511
+ }
5512
+ }).timeout(attemptTimeout);
5513
+ });
5514
+
5515
+ describe('#addRuleLabel - errors', () => {
5516
+ it('should have a addRuleLabel function', (done) => {
5517
+ try {
5518
+ assert.equal(true, typeof a.addRuleLabel === 'function');
5519
+ done();
5520
+ } catch (error) {
5521
+ log.error(`Test Failure: ${error}`);
5522
+ done(error);
5523
+ }
5524
+ }).timeout(attemptTimeout);
5525
+ });
5526
+
5527
+ describe('#getRuleLabelById - errors', () => {
5528
+ it('should have a getRuleLabelById function', (done) => {
5529
+ try {
5530
+ assert.equal(true, typeof a.getRuleLabelById === 'function');
5531
+ done();
5532
+ } catch (error) {
5533
+ log.error(`Test Failure: ${error}`);
5534
+ done(error);
5535
+ }
5536
+ }).timeout(attemptTimeout);
5537
+ it('should error if - missing ruleLabelId', (done) => {
5538
+ try {
5539
+ a.getRuleLabelById(null, (data, error) => {
5540
+ try {
5541
+ const displayE = 'ruleLabelId is required';
5542
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getRuleLabelById', displayE);
5543
+ done();
5544
+ } catch (err) {
5545
+ log.error(`Test Failure: ${err}`);
5546
+ done(err);
5547
+ }
5548
+ });
5549
+ } catch (error) {
5550
+ log.error(`Adapter Exception: ${error}`);
5551
+ done(error);
5552
+ }
5553
+ }).timeout(attemptTimeout);
5554
+ });
5555
+
5556
+ describe('#updateRuleLabel - errors', () => {
5557
+ it('should have a updateRuleLabel function', (done) => {
5558
+ try {
5559
+ assert.equal(true, typeof a.updateRuleLabel === 'function');
5560
+ done();
5561
+ } catch (error) {
5562
+ log.error(`Test Failure: ${error}`);
5563
+ done(error);
5564
+ }
5565
+ }).timeout(attemptTimeout);
5566
+ it('should error if - missing ruleLabelId', (done) => {
5567
+ try {
5568
+ a.updateRuleLabel(null, (data, error) => {
5569
+ try {
5570
+ const displayE = 'ruleLabelId is required';
5571
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-updateRuleLabel', displayE);
5572
+ done();
5573
+ } catch (err) {
5574
+ log.error(`Test Failure: ${err}`);
5575
+ done(err);
5576
+ }
5577
+ });
5578
+ } catch (error) {
5579
+ log.error(`Adapter Exception: ${error}`);
5580
+ done(error);
5581
+ }
5582
+ }).timeout(attemptTimeout);
5583
+ });
5584
+
5585
+ describe('#deleteRuleLabel - errors', () => {
5586
+ it('should have a deleteRuleLabel function', (done) => {
5587
+ try {
5588
+ assert.equal(true, typeof a.deleteRuleLabel === 'function');
5589
+ done();
5590
+ } catch (error) {
5591
+ log.error(`Test Failure: ${error}`);
5592
+ done(error);
5593
+ }
5594
+ }).timeout(attemptTimeout);
5595
+ it('should error if - missing ruleLabelId', (done) => {
5596
+ try {
5597
+ a.deleteRuleLabel(null, (data, error) => {
5598
+ try {
5599
+ const displayE = 'ruleLabelId is required';
5600
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-deleteRuleLabel', displayE);
5601
+ done();
5602
+ } catch (err) {
5603
+ log.error(`Test Failure: ${err}`);
5604
+ done(err);
5605
+ }
5606
+ });
5607
+ } catch (error) {
5608
+ log.error(`Adapter Exception: ${error}`);
5609
+ done(error);
5610
+ }
5611
+ }).timeout(attemptTimeout);
5612
+ });
5613
+
5614
+ describe('#getCustomFileHash - errors', () => {
5615
+ it('should have a getCustomFileHash function', (done) => {
5616
+ try {
5617
+ assert.equal(true, typeof a.getCustomFileHash === 'function');
5618
+ done();
5619
+ } catch (error) {
5620
+ log.error(`Test Failure: ${error}`);
5621
+ done(error);
5622
+ }
5623
+ }).timeout(attemptTimeout);
5624
+ });
5625
+
5626
+ describe('#updateCustomFileHash - errors', () => {
5627
+ it('should have a updateCustomFileHash function', (done) => {
5628
+ try {
5629
+ assert.equal(true, typeof a.updateCustomFileHash === 'function');
5630
+ done();
5631
+ } catch (error) {
5632
+ log.error(`Test Failure: ${error}`);
5633
+ done(error);
5634
+ }
5635
+ }).timeout(attemptTimeout);
5636
+ });
5637
+
5638
+ describe('#getCustomFileHashQuota - errors', () => {
5639
+ it('should have a getCustomFileHashQuota function', (done) => {
5640
+ try {
5641
+ assert.equal(true, typeof a.getCustomFileHashQuota === 'function');
5642
+ done();
5643
+ } catch (error) {
5644
+ log.error(`Test Failure: ${error}`);
5645
+ done(error);
5646
+ }
5647
+ }).timeout(attemptTimeout);
5648
+ });
5649
+
5650
+ describe('#bulkUpdateCloudApplication - errors', () => {
5651
+ it('should have a bulkUpdateCloudApplication function', (done) => {
5652
+ try {
5653
+ assert.equal(true, typeof a.bulkUpdateCloudApplication === 'function');
5654
+ done();
5655
+ } catch (error) {
5656
+ log.error(`Test Failure: ${error}`);
5657
+ done(error);
5658
+ }
5659
+ }).timeout(attemptTimeout);
5660
+ it('should error if - missing body', (done) => {
5661
+ try {
5662
+ a.bulkUpdateCloudApplication(null, (data, error) => {
5663
+ try {
5664
+ const displayE = 'body is required';
5665
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-bulkUpdateCloudApplication', displayE);
5666
+ done();
5667
+ } catch (err) {
5668
+ log.error(`Test Failure: ${err}`);
5669
+ done(err);
5670
+ }
5671
+ });
5672
+ } catch (error) {
5673
+ log.error(`Adapter Exception: ${error}`);
5674
+ done(error);
5675
+ }
5676
+ }).timeout(attemptTimeout);
5677
+ });
5678
+
5679
+ describe('#getCloudApplicationsLite - errors', () => {
5680
+ it('should have a getCloudApplicationsLite function', (done) => {
5681
+ try {
5682
+ assert.equal(true, typeof a.getCloudApplicationsLite === 'function');
5683
+ done();
5684
+ } catch (error) {
5685
+ log.error(`Test Failure: ${error}`);
5686
+ done(error);
5687
+ }
5688
+ }).timeout(attemptTimeout);
5689
+ });
5690
+
5691
+ describe('#getAllCustomTags - errors', () => {
5692
+ it('should have a getAllCustomTags function', (done) => {
5693
+ try {
5694
+ assert.equal(true, typeof a.getAllCustomTags === 'function');
5695
+ done();
5696
+ } catch (error) {
5697
+ log.error(`Test Failure: ${error}`);
5698
+ done(error);
5699
+ }
5700
+ }).timeout(attemptTimeout);
5701
+ });
5702
+
5703
+ describe('#getReportDataApplicationsExport - errors', () => {
5704
+ it('should have a getReportDataApplicationsExport function', (done) => {
5705
+ try {
5706
+ assert.equal(true, typeof a.getReportDataApplicationsExport === 'function');
5707
+ done();
5708
+ } catch (error) {
5709
+ log.error(`Test Failure: ${error}`);
5710
+ done(error);
5711
+ }
5712
+ }).timeout(attemptTimeout);
5713
+ it('should error if - missing body', (done) => {
5714
+ try {
5715
+ a.getReportDataApplicationsExport(null, (data, error) => {
5716
+ try {
5717
+ const displayE = 'body is required';
5718
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getReportDataApplicationsExport', displayE);
5719
+ done();
5720
+ } catch (err) {
5721
+ log.error(`Test Failure: ${err}`);
5722
+ done(err);
5723
+ }
5724
+ });
5725
+ } catch (error) {
5726
+ log.error(`Adapter Exception: ${error}`);
5727
+ done(error);
5728
+ }
5729
+ }).timeout(attemptTimeout);
5730
+ });
5731
+
5732
+ describe('#getReportTransactionsExport - errors', () => {
5733
+ it('should have a getReportTransactionsExport function', (done) => {
5734
+ try {
5735
+ assert.equal(true, typeof a.getReportTransactionsExport === 'function');
5736
+ done();
5737
+ } catch (error) {
5738
+ log.error(`Test Failure: ${error}`);
5739
+ done(error);
5740
+ }
5741
+ }).timeout(attemptTimeout);
5742
+ it('should error if - missing entity', (done) => {
5743
+ try {
5744
+ a.getReportTransactionsExport(null, null, (data, error) => {
5745
+ try {
5746
+ const displayE = 'entity is required';
5747
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getReportTransactionsExport', displayE);
5748
+ done();
5749
+ } catch (err) {
5750
+ log.error(`Test Failure: ${err}`);
5751
+ done(err);
5752
+ }
5753
+ });
5754
+ } catch (error) {
5755
+ log.error(`Adapter Exception: ${error}`);
5756
+ done(error);
5757
+ }
5758
+ }).timeout(attemptTimeout);
5759
+ it('should error if - missing body', (done) => {
5760
+ try {
5761
+ a.getReportTransactionsExport('fakeparam', null, (data, error) => {
5762
+ try {
5763
+ const displayE = 'body is required';
5764
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getReportTransactionsExport', displayE);
5765
+ done();
5766
+ } catch (err) {
5767
+ log.error(`Test Failure: ${err}`);
5768
+ done(err);
5769
+ }
5770
+ });
5771
+ } catch (error) {
5772
+ log.error(`Adapter Exception: ${error}`);
5773
+ done(error);
5774
+ }
5775
+ }).timeout(attemptTimeout);
5776
+ });
5777
+
5778
+ describe('#getAllGreTunnels - errors', () => {
5779
+ it('should have a getAllGreTunnels function', (done) => {
5780
+ try {
5781
+ assert.equal(true, typeof a.getAllGreTunnels === 'function');
5782
+ done();
5783
+ } catch (error) {
5784
+ log.error(`Test Failure: ${error}`);
5785
+ done(error);
5786
+ }
5787
+ }).timeout(attemptTimeout);
5788
+ });
5789
+
5790
+ describe('#addGreTunnel - errors', () => {
5791
+ it('should have a addGreTunnel function', (done) => {
5792
+ try {
5793
+ assert.equal(true, typeof a.addGreTunnel === 'function');
5794
+ done();
5795
+ } catch (error) {
5796
+ log.error(`Test Failure: ${error}`);
5797
+ done(error);
5798
+ }
5799
+ }).timeout(attemptTimeout);
5800
+ it('should error if - missing body', (done) => {
5801
+ try {
5802
+ a.addGreTunnel(null, (data, error) => {
5803
+ try {
5804
+ const displayE = 'body is required';
5805
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-addGreTunnel', displayE);
5806
+ done();
5807
+ } catch (err) {
5808
+ log.error(`Test Failure: ${err}`);
5809
+ done(err);
5810
+ }
5811
+ });
5812
+ } catch (error) {
5813
+ log.error(`Adapter Exception: ${error}`);
5814
+ done(error);
5815
+ }
5816
+ }).timeout(attemptTimeout);
5817
+ });
5818
+
5819
+ describe('#validateAndGetAvailableInternalIpRanges - errors', () => {
5820
+ it('should have a validateAndGetAvailableInternalIpRanges function', (done) => {
5821
+ try {
5822
+ assert.equal(true, typeof a.validateAndGetAvailableInternalIpRanges === 'function');
5823
+ done();
5824
+ } catch (error) {
5825
+ log.error(`Test Failure: ${error}`);
5826
+ done(error);
5827
+ }
5828
+ }).timeout(attemptTimeout);
5829
+ });
5830
+
5831
+ describe('#getGreTunelById - errors', () => {
5832
+ it('should have a getGreTunelById function', (done) => {
5833
+ try {
5834
+ assert.equal(true, typeof a.getGreTunelById === 'function');
5835
+ done();
5836
+ } catch (error) {
5837
+ log.error(`Test Failure: ${error}`);
5838
+ done(error);
5839
+ }
5840
+ }).timeout(attemptTimeout);
5841
+ it('should error if - missing id', (done) => {
5842
+ try {
5843
+ a.getGreTunelById(null, (data, error) => {
5844
+ try {
5845
+ const displayE = 'id is required';
5846
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getGreTunelById', displayE);
5847
+ done();
5848
+ } catch (err) {
5849
+ log.error(`Test Failure: ${err}`);
5850
+ done(err);
5851
+ }
5852
+ });
5853
+ } catch (error) {
5854
+ log.error(`Adapter Exception: ${error}`);
5855
+ done(error);
5856
+ }
5857
+ }).timeout(attemptTimeout);
5858
+ });
5859
+
5860
+ describe('#updateGreTunnel - errors', () => {
5861
+ it('should have a updateGreTunnel function', (done) => {
5862
+ try {
5863
+ assert.equal(true, typeof a.updateGreTunnel === 'function');
5864
+ done();
5865
+ } catch (error) {
5866
+ log.error(`Test Failure: ${error}`);
5867
+ done(error);
5868
+ }
5869
+ }).timeout(attemptTimeout);
5870
+ it('should error if - missing id', (done) => {
5871
+ try {
5872
+ a.updateGreTunnel(null, null, (data, error) => {
5873
+ try {
5874
+ const displayE = 'id is required';
5875
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-updateGreTunnel', displayE);
5876
+ done();
5877
+ } catch (err) {
5878
+ log.error(`Test Failure: ${err}`);
5879
+ done(err);
5880
+ }
5881
+ });
5882
+ } catch (error) {
5883
+ log.error(`Adapter Exception: ${error}`);
5884
+ done(error);
5885
+ }
5886
+ }).timeout(attemptTimeout);
5887
+ it('should error if - missing body', (done) => {
5888
+ try {
5889
+ a.updateGreTunnel('fakeparam', null, (data, error) => {
5890
+ try {
5891
+ const displayE = 'body is required';
5892
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-updateGreTunnel', displayE);
5893
+ done();
5894
+ } catch (err) {
5895
+ log.error(`Test Failure: ${err}`);
5896
+ done(err);
5897
+ }
5898
+ });
5899
+ } catch (error) {
5900
+ log.error(`Adapter Exception: ${error}`);
5901
+ done(error);
5902
+ }
5903
+ }).timeout(attemptTimeout);
5904
+ });
5905
+
5906
+ describe('#deleteGreTunnel - errors', () => {
5907
+ it('should have a deleteGreTunnel function', (done) => {
5908
+ try {
5909
+ assert.equal(true, typeof a.deleteGreTunnel === 'function');
5910
+ done();
5911
+ } catch (error) {
5912
+ log.error(`Test Failure: ${error}`);
5913
+ done(error);
5914
+ }
5915
+ }).timeout(attemptTimeout);
5916
+ it('should error if - missing id', (done) => {
5917
+ try {
5918
+ a.deleteGreTunnel(null, (data, error) => {
5919
+ try {
5920
+ const displayE = 'id is required';
5921
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-deleteGreTunnel', displayE);
5922
+ done();
5923
+ } catch (err) {
5924
+ log.error(`Test Failure: ${err}`);
5925
+ done(err);
5926
+ }
5927
+ });
5928
+ } catch (error) {
5929
+ log.error(`Adapter Exception: ${error}`);
5930
+ done(error);
5931
+ }
5932
+ }).timeout(attemptTimeout);
5933
+ });
5934
+
5935
+ describe('#getIPv6Configuration - errors', () => {
5936
+ it('should have a getIPv6Configuration function', (done) => {
5937
+ try {
5938
+ assert.equal(true, typeof a.getIPv6Configuration === 'function');
5939
+ done();
5940
+ } catch (error) {
5941
+ log.error(`Test Failure: ${error}`);
5942
+ done(error);
5943
+ }
5944
+ }).timeout(attemptTimeout);
5945
+ });
5946
+
5947
+ describe('#getDns64Prefixes - errors', () => {
5948
+ it('should have a getDns64Prefixes function', (done) => {
5949
+ try {
5950
+ assert.equal(true, typeof a.getDns64Prefixes === 'function');
5951
+ done();
5952
+ } catch (error) {
5953
+ log.error(`Test Failure: ${error}`);
5954
+ done(error);
5955
+ }
5956
+ }).timeout(attemptTimeout);
5957
+ });
5958
+
5959
+ describe('#getNat64Prefixes - errors', () => {
5960
+ it('should have a getNat64Prefixes function', (done) => {
5961
+ try {
5962
+ assert.equal(true, typeof a.getNat64Prefixes === 'function');
5963
+ done();
5964
+ } catch (error) {
5965
+ log.error(`Test Failure: ${error}`);
5966
+ done(error);
5967
+ }
5968
+ }).timeout(attemptTimeout);
5969
+ });
5970
+
5971
+ describe('#getIPGWDetails - errors', () => {
5972
+ it('should have a getIPGWDetails function', (done) => {
5973
+ try {
5974
+ assert.equal(true, typeof a.getIPGWDetails === 'function');
5975
+ done();
5976
+ } catch (error) {
5977
+ log.error(`Test Failure: ${error}`);
5978
+ done(error);
5979
+ }
5980
+ }).timeout(attemptTimeout);
5981
+ });
5982
+
5983
+ describe('#getRegionByGeoCoordinates - errors', () => {
5984
+ it('should have a getRegionByGeoCoordinates function', (done) => {
5985
+ try {
5986
+ assert.equal(true, typeof a.getRegionByGeoCoordinates === 'function');
5987
+ done();
5988
+ } catch (error) {
5989
+ log.error(`Test Failure: ${error}`);
5990
+ done(error);
5991
+ }
5992
+ }).timeout(attemptTimeout);
5993
+ it('should error if - missing latitude', (done) => {
5994
+ try {
5995
+ a.getRegionByGeoCoordinates(null, null, (data, error) => {
5996
+ try {
5997
+ const displayE = 'latitude is required';
5998
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getRegionByGeoCoordinates', displayE);
5999
+ done();
6000
+ } catch (err) {
6001
+ log.error(`Test Failure: ${err}`);
6002
+ done(err);
6003
+ }
6004
+ });
6005
+ } catch (error) {
6006
+ log.error(`Adapter Exception: ${error}`);
6007
+ done(error);
6008
+ }
6009
+ }).timeout(attemptTimeout);
6010
+ it('should error if - missing longitude', (done) => {
6011
+ try {
6012
+ a.getRegionByGeoCoordinates('fakeparam', null, (data, error) => {
6013
+ try {
6014
+ const displayE = 'longitude is required';
6015
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getRegionByGeoCoordinates', displayE);
6016
+ done();
6017
+ } catch (err) {
6018
+ log.error(`Test Failure: ${err}`);
6019
+ done(err);
6020
+ }
6021
+ });
6022
+ } catch (error) {
6023
+ log.error(`Adapter Exception: ${error}`);
6024
+ done(error);
6025
+ }
6026
+ }).timeout(attemptTimeout);
6027
+ });
6028
+
6029
+ describe('#getRegionBySrcIPAddress - errors', () => {
6030
+ it('should have a getRegionBySrcIPAddress function', (done) => {
6031
+ try {
6032
+ assert.equal(true, typeof a.getRegionBySrcIPAddress === 'function');
6033
+ done();
6034
+ } catch (error) {
6035
+ log.error(`Test Failure: ${error}`);
6036
+ done(error);
6037
+ }
6038
+ }).timeout(attemptTimeout);
6039
+ it('should error if - missing ip', (done) => {
6040
+ try {
6041
+ a.getRegionBySrcIPAddress(null, (data, error) => {
6042
+ try {
6043
+ const displayE = 'ip is required';
6044
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getRegionBySrcIPAddress', displayE);
6045
+ done();
6046
+ } catch (err) {
6047
+ log.error(`Test Failure: ${err}`);
6048
+ done(err);
6049
+ }
6050
+ });
6051
+ } catch (error) {
6052
+ log.error(`Adapter Exception: ${error}`);
6053
+ done(error);
6054
+ }
6055
+ }).timeout(attemptTimeout);
6056
+ });
6057
+
6058
+ describe('#getRegionsByPrefix - errors', () => {
6059
+ it('should have a getRegionsByPrefix function', (done) => {
6060
+ try {
6061
+ assert.equal(true, typeof a.getRegionsByPrefix === 'function');
6062
+ done();
6063
+ } catch (error) {
6064
+ log.error(`Test Failure: ${error}`);
6065
+ done(error);
6066
+ }
6067
+ }).timeout(attemptTimeout);
6068
+ });
6069
+
6070
+ describe('#getAllStaticIPs - errors', () => {
6071
+ it('should have a getAllStaticIPs function', (done) => {
6072
+ try {
6073
+ assert.equal(true, typeof a.getAllStaticIPs === 'function');
6074
+ done();
6075
+ } catch (error) {
6076
+ log.error(`Test Failure: ${error}`);
6077
+ done(error);
6078
+ }
6079
+ }).timeout(attemptTimeout);
6080
+ });
6081
+
6082
+ describe('#addStaticIP - errors', () => {
6083
+ it('should have a addStaticIP function', (done) => {
6084
+ try {
6085
+ assert.equal(true, typeof a.addStaticIP === 'function');
6086
+ done();
6087
+ } catch (error) {
6088
+ log.error(`Test Failure: ${error}`);
6089
+ done(error);
6090
+ }
6091
+ }).timeout(attemptTimeout);
6092
+ it('should error if - missing body', (done) => {
6093
+ try {
6094
+ a.addStaticIP(null, (data, error) => {
6095
+ try {
6096
+ const displayE = 'body is required';
6097
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-addStaticIP', displayE);
6098
+ done();
6099
+ } catch (err) {
6100
+ log.error(`Test Failure: ${err}`);
6101
+ done(err);
6102
+ }
6103
+ });
6104
+ } catch (error) {
6105
+ log.error(`Adapter Exception: ${error}`);
6106
+ done(error);
6107
+ }
6108
+ }).timeout(attemptTimeout);
6109
+ });
6110
+
6111
+ describe('#validateIPAddress - errors', () => {
6112
+ it('should have a validateIPAddress function', (done) => {
6113
+ try {
6114
+ assert.equal(true, typeof a.validateIPAddress === 'function');
6115
+ done();
6116
+ } catch (error) {
6117
+ log.error(`Test Failure: ${error}`);
6118
+ done(error);
6119
+ }
6120
+ }).timeout(attemptTimeout);
6121
+ it('should error if - missing body', (done) => {
6122
+ try {
6123
+ a.validateIPAddress(null, (data, error) => {
6124
+ try {
6125
+ const displayE = 'body is required';
6126
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-validateIPAddress', displayE);
6127
+ done();
6128
+ } catch (err) {
6129
+ log.error(`Test Failure: ${err}`);
6130
+ done(err);
6131
+ }
6132
+ });
6133
+ } catch (error) {
6134
+ log.error(`Adapter Exception: ${error}`);
6135
+ done(error);
6136
+ }
6137
+ }).timeout(attemptTimeout);
6138
+ });
6139
+
6140
+ describe('#getStaticIPById - errors', () => {
6141
+ it('should have a getStaticIPById function', (done) => {
6142
+ try {
6143
+ assert.equal(true, typeof a.getStaticIPById === 'function');
6144
+ done();
6145
+ } catch (error) {
6146
+ log.error(`Test Failure: ${error}`);
6147
+ done(error);
6148
+ }
6149
+ }).timeout(attemptTimeout);
6150
+ it('should error if - missing id', (done) => {
6151
+ try {
6152
+ a.getStaticIPById(null, (data, error) => {
6153
+ try {
6154
+ const displayE = 'id is required';
6155
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-getStaticIPById', displayE);
6156
+ done();
6157
+ } catch (err) {
6158
+ log.error(`Test Failure: ${err}`);
6159
+ done(err);
6160
+ }
6161
+ });
6162
+ } catch (error) {
6163
+ log.error(`Adapter Exception: ${error}`);
6164
+ done(error);
6165
+ }
6166
+ }).timeout(attemptTimeout);
6167
+ });
6168
+
6169
+ describe('#updateStaticIP - errors', () => {
6170
+ it('should have a updateStaticIP function', (done) => {
6171
+ try {
6172
+ assert.equal(true, typeof a.updateStaticIP === 'function');
6173
+ done();
6174
+ } catch (error) {
6175
+ log.error(`Test Failure: ${error}`);
6176
+ done(error);
6177
+ }
6178
+ }).timeout(attemptTimeout);
6179
+ it('should error if - missing id', (done) => {
6180
+ try {
6181
+ a.updateStaticIP(null, null, (data, error) => {
6182
+ try {
6183
+ const displayE = 'id is required';
6184
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-updateStaticIP', displayE);
6185
+ done();
6186
+ } catch (err) {
6187
+ log.error(`Test Failure: ${err}`);
6188
+ done(err);
6189
+ }
6190
+ });
6191
+ } catch (error) {
6192
+ log.error(`Adapter Exception: ${error}`);
6193
+ done(error);
6194
+ }
6195
+ }).timeout(attemptTimeout);
6196
+ it('should error if - missing body', (done) => {
6197
+ try {
6198
+ a.updateStaticIP('fakeparam', null, (data, error) => {
6199
+ try {
6200
+ const displayE = 'body is required';
6201
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-updateStaticIP', displayE);
6202
+ done();
6203
+ } catch (err) {
6204
+ log.error(`Test Failure: ${err}`);
6205
+ done(err);
6206
+ }
6207
+ });
6208
+ } catch (error) {
6209
+ log.error(`Adapter Exception: ${error}`);
6210
+ done(error);
6211
+ }
6212
+ }).timeout(attemptTimeout);
6213
+ });
6214
+
6215
+ describe('#deleteStaticIP - errors', () => {
6216
+ it('should have a deleteStaticIP function', (done) => {
6217
+ try {
6218
+ assert.equal(true, typeof a.deleteStaticIP === 'function');
6219
+ done();
6220
+ } catch (error) {
6221
+ log.error(`Test Failure: ${error}`);
6222
+ done(error);
6223
+ }
6224
+ }).timeout(attemptTimeout);
6225
+ it('should error if - missing id', (done) => {
6226
+ try {
6227
+ a.deleteStaticIP(null, (data, error) => {
6228
+ try {
6229
+ const displayE = 'id is required';
6230
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-deleteStaticIP', displayE);
6231
+ done();
6232
+ } catch (err) {
6233
+ log.error(`Test Failure: ${err}`);
6234
+ done(err);
6235
+ }
6236
+ });
6237
+ } catch (error) {
6238
+ log.error(`Adapter Exception: ${error}`);
6239
+ done(error);
6240
+ }
6241
+ }).timeout(attemptTimeout);
6242
+ });
6243
+
6244
+ describe('#getZscalerNodesDetails - errors', () => {
6245
+ it('should have a getZscalerNodesDetails function', (done) => {
6246
+ try {
6247
+ assert.equal(true, typeof a.getZscalerNodesDetails === 'function');
6248
+ done();
6249
+ } catch (error) {
6250
+ log.error(`Test Failure: ${error}`);
6251
+ done(error);
6252
+ }
6253
+ }).timeout(attemptTimeout);
6254
+ });
6255
+
6256
+ describe('#getRecommendedVipsGroupedByDC - errors', () => {
6257
+ it('should have a getRecommendedVipsGroupedByDC function', (done) => {
6258
+ try {
6259
+ assert.equal(true, typeof a.getRecommendedVipsGroupedByDC === 'function');
6260
+ done();
6261
+ } catch (error) {
6262
+ log.error(`Test Failure: ${error}`);
6263
+ done(error);
6264
+ }
6265
+ }).timeout(attemptTimeout);
6266
+ });
6267
+
6268
+ describe('#getRecommendedGreVips - errors', () => {
6269
+ it('should have a getRecommendedGreVips function', (done) => {
6270
+ try {
6271
+ assert.equal(true, typeof a.getRecommendedGreVips === 'function');
6272
+ done();
6273
+ } catch (error) {
6274
+ log.error(`Test Failure: ${error}`);
6275
+ done(error);
6276
+ }
6277
+ }).timeout(attemptTimeout);
6278
+ });
6279
+
6280
+ describe('#getAuthExemptedUrls - errors', () => {
6281
+ it('should have a getAuthExemptedUrls function', (done) => {
6282
+ try {
6283
+ assert.equal(true, typeof a.getAuthExemptedUrls === 'function');
6284
+ done();
6285
+ } catch (error) {
6286
+ log.error(`Test Failure: ${error}`);
6287
+ done(error);
6288
+ }
6289
+ }).timeout(attemptTimeout);
6290
+ });
6291
+
6292
+ describe('#updateAuthExemptedUrls - errors', () => {
6293
+ it('should have a updateAuthExemptedUrls function', (done) => {
6294
+ try {
6295
+ assert.equal(true, typeof a.updateAuthExemptedUrls === 'function');
6296
+ done();
6297
+ } catch (error) {
6298
+ log.error(`Test Failure: ${error}`);
6299
+ done(error);
6300
+ }
6301
+ }).timeout(attemptTimeout);
6302
+ it('should error if - missing action', (done) => {
6303
+ try {
6304
+ a.updateAuthExemptedUrls(null, (data, error) => {
6305
+ try {
6306
+ const displayE = 'action is required';
6307
+ runErrorAsserts(data, error, 'AD.300', 'Test-zscaler-adapter-updateAuthExemptedUrls', displayE);
6308
+ done();
6309
+ } catch (err) {
6310
+ log.error(`Test Failure: ${err}`);
6311
+ done(err);
6312
+ }
6313
+ });
6314
+ } catch (error) {
6315
+ log.error(`Adapter Exception: ${error}`);
6316
+ done(error);
6317
+ }
6318
+ }).timeout(attemptTimeout);
6319
+ });
6320
+
6321
+ describe('#getWorkloadGroups - errors', () => {
6322
+ it('should have a getWorkloadGroups function', (done) => {
6323
+ try {
6324
+ assert.equal(true, typeof a.getWorkloadGroups === 'function');
6325
+ done();
6326
+ } catch (error) {
6327
+ log.error(`Test Failure: ${error}`);
6328
+ done(error);
6329
+ }
6330
+ }).timeout(attemptTimeout);
6331
+ });
6332
+
6333
+ describe('#getLocationGroups - errors', () => {
6334
+ it('should have a getLocationGroups function', (done) => {
6335
+ try {
6336
+ assert.equal(true, typeof a.getLocationGroups === 'function');
6337
+ done();
6338
+ } catch (error) {
6339
+ log.error(`Test Failure: ${error}`);
6340
+ done(error);
6341
+ }
6342
+ }).timeout(attemptTimeout);
6343
+ });
2497
6344
  });
2498
6345
  });