Commit 65da9b8c authored by Romain Courteaud's avatar Romain Courteaud

slapos_crm: update tests

parent eeacf205
portal = context.getPortalObject() portal = context.getPortalObject()
sub_tag = "RegularisationRequest_stopInstanceTreeList" sub_tag = "RegularisationRequest_stopInstanceTreeList"
portal.portal_catalog.searchAndActivate( portal.portal_catalog.searchAndActivate(
portal_type="Regularisation Request", portal_type="Regularisation Request",
simulation_state=["suspended"], simulation_state=["suspended"],
default_resource_uid=[ resource__uid=[
portal.service_module.slapos_crm_stop_acknowledgement.getUid(), portal.service_module.slapos_crm_stop_acknowledgement.getUid(),
portal.service_module.slapos_crm_delete_reminder.getUid(), portal.service_module.slapos_crm_delete_reminder.getUid(),
portal.service_module.slapos_crm_delete_acknowledgement.getUid(), portal.service_module.slapos_crm_delete_acknowledgement.getUid(),
......
...@@ -401,7 +401,10 @@ class TestSlapOSCrmStopInstanceTree(SlapOSTestCaseMixinWithAbort): ...@@ -401,7 +401,10 @@ class TestSlapOSCrmStopInstanceTree(SlapOSTestCaseMixinWithAbort):
reference="TESTREGREQ-%s" % new_id, reference="TESTREGREQ-%s" % new_id,
) )
def test_stopInstanceTree_matching_regularisation_request(self): #################################################################
# slapos_crm_trigger_delete_reminder_escalation
#################################################################
def test_RegularisationRequest_stopInstanceTreeList_alarm_matchingRegularisationRequest(self):
ticket = self.createRegularisationRequest() ticket = self.createRegularisationRequest()
ticket.edit(resource='service_module/slapos_crm_delete_reminder') ticket.edit(resource='service_module/slapos_crm_delete_reminder')
ticket.validate() ticket.validate()
...@@ -412,7 +415,7 @@ class TestSlapOSCrmStopInstanceTree(SlapOSTestCaseMixinWithAbort): ...@@ -412,7 +415,7 @@ class TestSlapOSCrmStopInstanceTree(SlapOSTestCaseMixinWithAbort):
slapos_crm_stop_instance_tree slapos_crm_stop_instance_tree
self._test_alarm(alarm, ticket, "RegularisationRequest_stopInstanceTreeList") self._test_alarm(alarm, ticket, "RegularisationRequest_stopInstanceTreeList")
def test_stopInstanceTree_matching_regularisation_request_2(self): def test_RegularisationRequest_stopInstanceTreeList_alarm_matchingRegularisationRequest2(self):
ticket = self.createRegularisationRequest() ticket = self.createRegularisationRequest()
ticket.edit(resource='service_module/slapos_crm_stop_acknowledgement') ticket.edit(resource='service_module/slapos_crm_stop_acknowledgement')
ticket.validate() ticket.validate()
...@@ -423,7 +426,7 @@ class TestSlapOSCrmStopInstanceTree(SlapOSTestCaseMixinWithAbort): ...@@ -423,7 +426,7 @@ class TestSlapOSCrmStopInstanceTree(SlapOSTestCaseMixinWithAbort):
slapos_crm_stop_instance_tree slapos_crm_stop_instance_tree
self._test_alarm(alarm, ticket, "RegularisationRequest_stopInstanceTreeList") self._test_alarm(alarm, ticket, "RegularisationRequest_stopInstanceTreeList")
def test_stopInstanceTree_not_suspended(self): def test_RegularisationRequest_stopInstanceTreeList_alarm_notSuspended(self):
ticket = self.createRegularisationRequest() ticket = self.createRegularisationRequest()
ticket.edit(resource='service_module/slapos_crm_stop_acknowledgement') ticket.edit(resource='service_module/slapos_crm_stop_acknowledgement')
ticket.validate() ticket.validate()
...@@ -433,8 +436,7 @@ class TestSlapOSCrmStopInstanceTree(SlapOSTestCaseMixinWithAbort): ...@@ -433,8 +436,7 @@ class TestSlapOSCrmStopInstanceTree(SlapOSTestCaseMixinWithAbort):
slapos_crm_stop_instance_tree slapos_crm_stop_instance_tree
self._test_alarm_not_visited(alarm, ticket, "RegularisationRequest_stopInstanceTreeList") self._test_alarm_not_visited(alarm, ticket, "RegularisationRequest_stopInstanceTreeList")
def test_RegularisationRequest_stopInstanceTreeList_alarm_otherResource(self):
def test_stopInstanceTree_other_resource(self):
ticket = self.createRegularisationRequest() ticket = self.createRegularisationRequest()
ticket.edit(resource='service_module/slapos_acknowledgement') ticket.edit(resource='service_module/slapos_acknowledgement')
ticket.validate() ticket.validate()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment