public void alertSpecServerTemplateViewIndex() { List <AlertSpec> alertSpecList = AlertSpec.index_serverTemplate(serverTemplateID, "default"); Assert.IsNotNull(alertSpecList); Assert.IsTrue(alertSpecList.Count > 0); }
public void aletSpecServerArrayIndex() { List <AlertSpec> alertSpecList = AlertSpec.index_serverArray(liveTestServerArrayID); Assert.IsNotNull(alertSpecList); Assert.IsTrue(alertSpecList.Count > 0); }
public void alertSpecServerIndex() { List <AlertSpec> alertSpecList = AlertSpec.index(liveTestServerID); Assert.IsNotNull(alertSpecList); //TODO: I'm not entirely sure why this is currently failing... //Assert.IsTrue(alertSpecList.Count > 0); }
public void alertSpecServerTemplateFilterIndex() { List <AlertSpec> alertSpecList = AlertSpec.index_serverTemplate(serverTemplateID, "default"); Assert.IsNotNull(alertSpecList); Assert.IsTrue(alertSpecList.Count > 0); List <Filter> filterSet = new List <Filter>(); filterSet.Add(new Filter("name", FilterOperator.Equal, "cpu")); List <AlertSpec> filteredAlertSpecList = AlertSpec.index_serverTemplate(serverTemplateID, filterSet, "default"); Assert.IsNotNull(filteredAlertSpecList); Assert.IsTrue(filteredAlertSpecList.Count > 0); Assert.IsTrue(filteredAlertSpecList.Count <= alertSpecList.Count); }
public void alertSpecServerFilterIndex() { List <AlertSpec> alertSpecList = AlertSpec.index(liveTestServerID, "default"); Assert.IsNotNull(alertSpecList); //TODO: I'm not entirely sure why this is currently failing... //Assert.IsTrue(alertSpecList.Count > 0); List <Filter> filterSet = new List <Filter>(); filterSet.Add(new Filter("name", FilterOperator.Equal, "cpu")); List <AlertSpec> filteredAlertSpecList = AlertSpec.index(liveTestServerID, filterSet, "default"); Assert.IsNotNull(filteredAlertSpecList); //TODO: I'm not entirely sure why this is currently failing... //Assert.IsTrue(filteredAlertSpecList.Count > 0); Assert.IsTrue(filteredAlertSpecList.Count <= alertSpecList.Count); }
public void createReadUpdateDeleteAlertSpecServerArray() { string alertSpecID = AlertSpec.create_serverArray(">", "this is a description", "5", string.Empty, "cpu-0/cpu-idle", "alert spec name", string.Empty, "5", "value", "vote tag", "grow", liveTestServerArrayID); Assert.IsNotNull(alertSpecID); AlertSpec testAlertSpec = AlertSpec.show_serverArray(alertSpecID, liveTestServerArrayID); Assert.IsNotNull(testAlertSpec); bool updated = AlertSpec.update_serverArray("", "this is a new description", "", "", "", "", "", "", "", "", "", alertSpecID, liveTestServerArrayID); Assert.IsTrue(updated); AlertSpec testUpdatedAlertSpec = AlertSpec.show_serverTemplate(alertSpecID, liveTestServerArrayID); Assert.IsNotNull(testUpdatedAlertSpec); Assert.AreNotEqual <string>(testAlertSpec.description, testUpdatedAlertSpec.description); bool retVal = AlertSpec.destroy_serverArray(alertSpecID, serverTemplateID); Assert.IsTrue(retVal); }
public void createReadUpdateDeleteAlertSpec_forServer() { string alertSpecID = AlertSpec.create(">", "this is a description", "5", string.Empty, "cpu-0/cpu-idle", "alert spec name", "/api/servers/" + this.liveTestServerID, "5", "value", "vote tag", "grow"); Assert.IsNotNull(alertSpecID); AlertSpec testAlertSpec = AlertSpec.show(alertSpecID); Assert.IsNotNull(testAlertSpec); bool updated = AlertSpec.update("", "this is a new description", "", "", "", "", "", "", "", "", "", alertSpecID); Assert.IsTrue(updated); AlertSpec testUpdatedAlertSpec = AlertSpec.show(alertSpecID); Assert.IsNotNull(testUpdatedAlertSpec); Assert.AreNotEqual <string>(testAlertSpec.description, testUpdatedAlertSpec.description); bool retVal = AlertSpec.destroy(alertSpecID); Assert.IsTrue(retVal); }