@itentialopensource/adapter-rubrik 0.6.4 → 0.7.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.
@@ -1536,5 +1536,342 @@ describe('[unit] Rubrik Adapter Test', () => {
1536
1536
  }
1537
1537
  }).timeout(attemptTimeout);
1538
1538
  });
1539
+
1540
+ describe('#checkIfClusterLocked - errors', () => {
1541
+ it('should have a checkIfClusterLocked function', (done) => {
1542
+ try {
1543
+ assert.equal(true, typeof a.checkIfClusterLocked === 'function');
1544
+ done();
1545
+ } catch (error) {
1546
+ log.error(`Test Failure: ${error}`);
1547
+ done(error);
1548
+ }
1549
+ }).timeout(attemptTimeout);
1550
+ });
1551
+
1552
+ describe('#getClusterWorkflowVersion - errors', () => {
1553
+ it('should have a getClusterWorkflowVersion function', (done) => {
1554
+ try {
1555
+ assert.equal(true, typeof a.getClusterWorkflowVersion === 'function');
1556
+ done();
1557
+ } catch (error) {
1558
+ log.error(`Test Failure: ${error}`);
1559
+ done(error);
1560
+ }
1561
+ }).timeout(attemptTimeout);
1562
+ });
1563
+
1564
+ describe('#configureVmanage - errors', () => {
1565
+ it('should have a configureVmanage function', (done) => {
1566
+ try {
1567
+ assert.equal(true, typeof a.configureVmanage === 'function');
1568
+ done();
1569
+ } catch (error) {
1570
+ log.error(`Test Failure: ${error}`);
1571
+ done(error);
1572
+ }
1573
+ }).timeout(attemptTimeout);
1574
+ });
1575
+
1576
+ describe('#getConnectedDevices - errors', () => {
1577
+ it('should have a getConnectedDevices function', (done) => {
1578
+ try {
1579
+ assert.equal(true, typeof a.getConnectedDevices === 'function');
1580
+ done();
1581
+ } catch (error) {
1582
+ log.error(`Test Failure: ${error}`);
1583
+ done(error);
1584
+ }
1585
+ }).timeout(attemptTimeout);
1586
+ it('should error if - missing vmanageIP', (done) => {
1587
+ try {
1588
+ a.getConnectedDevices(null, null, (data, error) => {
1589
+ try {
1590
+ const displayE = 'vmanageIP is required';
1591
+ runErrorAsserts(data, error, 'AD.300', 'Test-rubrik-adapter-getConnectedDevices', displayE);
1592
+ done();
1593
+ } catch (err) {
1594
+ log.error(`Test Failure: ${err}`);
1595
+ done(err);
1596
+ }
1597
+ });
1598
+ } catch (error) {
1599
+ log.error(`Adapter Exception: ${error}`);
1600
+ done(error);
1601
+ }
1602
+ }).timeout(attemptTimeout);
1603
+ });
1604
+
1605
+ describe('#healthDetails - errors', () => {
1606
+ it('should have a healthDetails function', (done) => {
1607
+ try {
1608
+ assert.equal(true, typeof a.healthDetails === 'function');
1609
+ done();
1610
+ } catch (error) {
1611
+ log.error(`Test Failure: ${error}`);
1612
+ done(error);
1613
+ }
1614
+ }).timeout(attemptTimeout);
1615
+ });
1616
+
1617
+ describe('#healthStatusInfo - errors', () => {
1618
+ it('should have a healthStatusInfo function', (done) => {
1619
+ try {
1620
+ assert.equal(true, typeof a.healthStatusInfo === 'function');
1621
+ done();
1622
+ } catch (error) {
1623
+ log.error(`Test Failure: ${error}`);
1624
+ done(error);
1625
+ }
1626
+ }).timeout(attemptTimeout);
1627
+ });
1628
+
1629
+ describe('#healthSummary - errors', () => {
1630
+ it('should have a healthSummary function', (done) => {
1631
+ try {
1632
+ assert.equal(true, typeof a.healthSummary === 'function');
1633
+ done();
1634
+ } catch (error) {
1635
+ log.error(`Test Failure: ${error}`);
1636
+ done(error);
1637
+ }
1638
+ }).timeout(attemptTimeout);
1639
+ });
1640
+
1641
+ describe('#getConfiguredIPList - errors', () => {
1642
+ it('should have a getConfiguredIPList function', (done) => {
1643
+ try {
1644
+ assert.equal(true, typeof a.getConfiguredIPList === 'function');
1645
+ done();
1646
+ } catch (error) {
1647
+ log.error(`Test Failure: ${error}`);
1648
+ done(error);
1649
+ }
1650
+ }).timeout(attemptTimeout);
1651
+ it('should error if - missing vmanageID', (done) => {
1652
+ try {
1653
+ a.getConfiguredIPList(null, null, (data, error) => {
1654
+ try {
1655
+ const displayE = 'vmanageID is required';
1656
+ runErrorAsserts(data, error, 'AD.300', 'Test-rubrik-adapter-getConfiguredIPList', displayE);
1657
+ done();
1658
+ } catch (err) {
1659
+ log.error(`Test Failure: ${err}`);
1660
+ done(err);
1661
+ }
1662
+ });
1663
+ } catch (error) {
1664
+ log.error(`Adapter Exception: ${error}`);
1665
+ done(error);
1666
+ }
1667
+ }).timeout(attemptTimeout);
1668
+ });
1669
+
1670
+ describe('#isClusterReady - errors', () => {
1671
+ it('should have a isClusterReady function', (done) => {
1672
+ try {
1673
+ assert.equal(true, typeof a.isClusterReady === 'function');
1674
+ done();
1675
+ } catch (error) {
1676
+ log.error(`Test Failure: ${error}`);
1677
+ done(error);
1678
+ }
1679
+ }).timeout(attemptTimeout);
1680
+ });
1681
+
1682
+ describe('#listVmanages - errors', () => {
1683
+ it('should have a listVmanages function', (done) => {
1684
+ try {
1685
+ assert.equal(true, typeof a.listVmanages === 'function');
1686
+ done();
1687
+ } catch (error) {
1688
+ log.error(`Test Failure: ${error}`);
1689
+ done(error);
1690
+ }
1691
+ }).timeout(attemptTimeout);
1692
+ });
1693
+
1694
+ describe('#nodeProperties - errors', () => {
1695
+ it('should have a nodeProperties function', (done) => {
1696
+ try {
1697
+ assert.equal(true, typeof a.nodeProperties === 'function');
1698
+ done();
1699
+ } catch (error) {
1700
+ log.error(`Test Failure: ${error}`);
1701
+ done(error);
1702
+ }
1703
+ }).timeout(attemptTimeout);
1704
+ });
1705
+
1706
+ describe('#removeVmanage - errors', () => {
1707
+ it('should have a removeVmanage function', (done) => {
1708
+ try {
1709
+ assert.equal(true, typeof a.removeVmanage === 'function');
1710
+ done();
1711
+ } catch (error) {
1712
+ log.error(`Test Failure: ${error}`);
1713
+ done(error);
1714
+ }
1715
+ }).timeout(attemptTimeout);
1716
+ });
1717
+
1718
+ describe('#performReplicationAndRebalanceOfKafkaPartitions - errors', () => {
1719
+ it('should have a performReplicationAndRebalanceOfKafkaPartitions function', (done) => {
1720
+ try {
1721
+ assert.equal(true, typeof a.performReplicationAndRebalanceOfKafkaPartitions === 'function');
1722
+ done();
1723
+ } catch (error) {
1724
+ log.error(`Test Failure: ${error}`);
1725
+ done(error);
1726
+ }
1727
+ }).timeout(attemptTimeout);
1728
+ });
1729
+
1730
+ describe('#editVmanage - errors', () => {
1731
+ it('should have a editVmanage function', (done) => {
1732
+ try {
1733
+ assert.equal(true, typeof a.editVmanage === 'function');
1734
+ done();
1735
+ } catch (error) {
1736
+ log.error(`Test Failure: ${error}`);
1737
+ done(error);
1738
+ }
1739
+ }).timeout(attemptTimeout);
1740
+ });
1741
+
1742
+ describe('#addVmanage - errors', () => {
1743
+ it('should have a addVmanage function', (done) => {
1744
+ try {
1745
+ assert.equal(true, typeof a.addVmanage === 'function');
1746
+ done();
1747
+ } catch (error) {
1748
+ log.error(`Test Failure: ${error}`);
1749
+ done(error);
1750
+ }
1751
+ }).timeout(attemptTimeout);
1752
+ });
1753
+
1754
+ describe('#getTenancyMode - errors', () => {
1755
+ it('should have a getTenancyMode function', (done) => {
1756
+ try {
1757
+ assert.equal(true, typeof a.getTenancyMode === 'function');
1758
+ done();
1759
+ } catch (error) {
1760
+ log.error(`Test Failure: ${error}`);
1761
+ done(error);
1762
+ }
1763
+ }).timeout(attemptTimeout);
1764
+ });
1765
+
1766
+ describe('#setTenancyMode - errors', () => {
1767
+ it('should have a setTenancyMode function', (done) => {
1768
+ try {
1769
+ assert.equal(true, typeof a.setTenancyMode === 'function');
1770
+ done();
1771
+ } catch (error) {
1772
+ log.error(`Test Failure: ${error}`);
1773
+ done(error);
1774
+ }
1775
+ }).timeout(attemptTimeout);
1776
+ });
1777
+
1778
+ describe('#getTenantsList - errors', () => {
1779
+ it('should have a getTenantsList function', (done) => {
1780
+ try {
1781
+ assert.equal(true, typeof a.getTenantsList === 'function');
1782
+ done();
1783
+ } catch (error) {
1784
+ log.error(`Test Failure: ${error}`);
1785
+ done(error);
1786
+ }
1787
+ }).timeout(attemptTimeout);
1788
+ });
1789
+
1790
+ describe('#addOrUpdateUserCredentials - errors', () => {
1791
+ it('should have a addOrUpdateUserCredentials function', (done) => {
1792
+ try {
1793
+ assert.equal(true, typeof a.addOrUpdateUserCredentials === 'function');
1794
+ done();
1795
+ } catch (error) {
1796
+ log.error(`Test Failure: ${error}`);
1797
+ done(error);
1798
+ }
1799
+ }).timeout(attemptTimeout);
1800
+ });
1801
+
1802
+ describe('#getVManageDetails - errors', () => {
1803
+ it('should have a getVManageDetails function', (done) => {
1804
+ try {
1805
+ assert.equal(true, typeof a.getVManageDetails === 'function');
1806
+ done();
1807
+ } catch (error) {
1808
+ log.error(`Test Failure: ${error}`);
1809
+ done(error);
1810
+ }
1811
+ }).timeout(attemptTimeout);
1812
+ it('should error if - missing vmanageIP', (done) => {
1813
+ try {
1814
+ a.getVManageDetails(null, null, (data, error) => {
1815
+ try {
1816
+ const displayE = 'vmanageIP is required';
1817
+ runErrorAsserts(data, error, 'AD.300', 'Test-rubrik-adapter-getVManageDetails', displayE);
1818
+ done();
1819
+ } catch (err) {
1820
+ log.error(`Test Failure: ${err}`);
1821
+ done(err);
1822
+ }
1823
+ });
1824
+ } catch (error) {
1825
+ log.error(`Adapter Exception: ${error}`);
1826
+ done(error);
1827
+ }
1828
+ }).timeout(attemptTimeout);
1829
+ });
1830
+
1831
+ describe('#getConnectedDevicesPerTenant - errors', () => {
1832
+ it('should have a getConnectedDevicesPerTenant function', (done) => {
1833
+ try {
1834
+ assert.equal(true, typeof a.getConnectedDevicesPerTenant === 'function');
1835
+ done();
1836
+ } catch (error) {
1837
+ log.error(`Test Failure: ${error}`);
1838
+ done(error);
1839
+ }
1840
+ }).timeout(attemptTimeout);
1841
+ it('should error if - missing tenantId', (done) => {
1842
+ try {
1843
+ a.getConnectedDevicesPerTenant(null, null, null, (data, error) => {
1844
+ try {
1845
+ const displayE = 'tenantId is required';
1846
+ runErrorAsserts(data, error, 'AD.300', 'Test-rubrik-adapter-getConnectedDevicesPerTenant', displayE);
1847
+ done();
1848
+ } catch (err) {
1849
+ log.error(`Test Failure: ${err}`);
1850
+ done(err);
1851
+ }
1852
+ });
1853
+ } catch (error) {
1854
+ log.error(`Adapter Exception: ${error}`);
1855
+ done(error);
1856
+ }
1857
+ }).timeout(attemptTimeout);
1858
+ it('should error if - missing vmanageIP', (done) => {
1859
+ try {
1860
+ a.getConnectedDevicesPerTenant('fakeparam', null, null, (data, error) => {
1861
+ try {
1862
+ const displayE = 'vmanageIP is required';
1863
+ runErrorAsserts(data, error, 'AD.300', 'Test-rubrik-adapter-getConnectedDevicesPerTenant', displayE);
1864
+ done();
1865
+ } catch (err) {
1866
+ log.error(`Test Failure: ${err}`);
1867
+ done(err);
1868
+ }
1869
+ });
1870
+ } catch (error) {
1871
+ log.error(`Adapter Exception: ${error}`);
1872
+ done(error);
1873
+ }
1874
+ }).timeout(attemptTimeout);
1875
+ });
1539
1876
  });
1540
1877
  });