def test_checkVolumePerfDataMatch(self, mock_readLiveStatus): mock_readLiveStatus.return_value = _getJson() numVolumes, testTotalUsed, testTotalAvail = ( check_cluster_vol_usage.checkVolumePerfData("test-cluster")) print("testTotal %s" % testTotalUsed) assert numVolumes == 2 assert (testTotalUsed == 700) assert (testTotalAvail == 1134)
def test_checkVolumePerfNoData(self, mock_readLiveStatus): mock_readLiveStatus.return_value = _getJsonWithoutCustomAndPerData() numVolumes, testTotalUsed, testTotalAvail = ( check_cluster_vol_usage.checkVolumePerfData("test-cluster")) assert numVolumes == 2 assert testTotalUsed == 0
def test_checkVolumePerfDataNoMatch(self, mock_readLiveStatus): mock_readLiveStatus.return_value = _getJsonNoData() numVolumes, testTotalUsed, testTotalAvail = ( check_cluster_vol_usage.checkVolumePerfData("dummy-cluster")) assert numVolumes == 0 assert testTotalUsed == 0