Commit 0d3a258c authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: check the Subscription Request instead of the Cloud Contract

parent 605d1749
......@@ -573,6 +573,22 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
if q.getTitle() == instance_title]
self.assertEqual(0, len(instance_tree_list))
def checkServiceSubscriptionRequest(self, service):
self.login()
self.stepCallSlaposSubscriptionRequestCreateFromOrphanedItemAlarm()
self.tic()
subscription_request = self.portal.portal_catalog.getResultValue(
portal_type="Subscription Request",
aggregate__uid=service.getUid(),
simulation_state='validated'
)
self.assertNotEqual(subscription_request, None)
self.stepCallSlaposAssertInstanceTreeSuccessorAlarm()
self.tic()
def checkCloudContract(self, person_user_id, person_reference,
instance_title, software_release, software_type, server):
......@@ -651,12 +667,18 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
project_reference=project_reference
)
self.checkCloudContract(person_user_id, person_reference,
instance_title, software_release, software_type, server)
# XXX search only for this user
instance_tree = self.portal.portal_catalog.getResultValue(
portal_type="Instance Tree",
title=instance_title,
follow_up__reference=project_reference
)
self.checkServiceSubscriptionRequest(instance_tree)
self.stepCallSlaposAllocateInstanceAlarm()
self.tic()
self.login(person_user_id)
self.personRequestInstance(
software_release=software_release,
software_type=software_type,
......
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