Commit 431fe7f9 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: drop checkCloudContract method

parent 8ba7d07a
...@@ -492,8 +492,13 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin): ...@@ -492,8 +492,13 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
shared_xml=shared_xml, shared_xml=shared_xml,
) )
self.checkCloudContract(person_user_id, person_reference, # XXX search only for this user
instance_title, software_release, software_type, server) 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.stepCallSlaposAllocateInstanceAlarm()
self.tic() self.tic()
...@@ -589,71 +594,6 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin): ...@@ -589,71 +594,6 @@ class DefaultScenarioMixin(TestSlapOSSecurityMixin):
self.stepCallSlaposAssertInstanceTreeSuccessorAlarm() self.stepCallSlaposAssertInstanceTreeSuccessorAlarm()
self.tic() self.tic()
def checkCloudContract(self, person_user_id, person_reference,
instance_title, software_release, software_type, server):
self.login()
self.assertTrue(self.portal.portal_preferences.getPreferredCloudContractEnabled())
self.stepCallSlaposContractRequestValidationPaymentAlarm()
self.tic()
# stabilise aggregated invoices and expand them
self.stepCallSlaposManageBuildingCalculatingDeliveryAlarm()
self.tic()
# update invoices with their tax & discount
self.stepCallSlaposTriggerBuildAlarm()
self.tic()
self.stepCallSlaposManageBuildingCalculatingDeliveryAlarm()
self.tic()
# update invoices with their tax & discount transaction lines
self.stepCallSlaposTriggerBuildAlarm()
self.tic()
self.stepCallSlaposManageBuildingCalculatingDeliveryAlarm()
self.tic()
# stop the invoices and solve them again
self.stepCallSlaposStopConfirmedAggregatedSaleInvoiceTransactionAlarm()
self.tic()
self.stepCallSlaposManageBuildingCalculatingDeliveryAlarm()
self.tic()
if 0:
# trigger the CRM interaction
self.stepCallSlaposCrmCreateRegularisationRequestAlarm()
self.tic()
# trigger the CRM interaction
self.stepCallSlaposCrmCreateRegularisationRequestAlarm()
self.tic()
self.login()
person = self.portal.portal_catalog.getResultValue(
portal_type="Person",
user_id=person_user_id)
contract = self.portal.portal_catalog.getResultValue(
portal_type="Cloud Contract",
default_destination_section_uid=person.getUid(),
validation_state=['invalidated', 'validated'])
self.assertNotEqual(contract, None)
if contract.getValidationState() != 'validated':
self.assertEqual(contract.getValidationState(), "invalidated")
# HACK FOR NOW
contract.validate()
self.tic()
self.login(person_user_id)
self.stepCallSlaposContractRequestValidationPaymentAlarm()
self.tic()
def checkInstanceAllocation(self, person_user_id, person_reference, def checkInstanceAllocation(self, person_user_id, person_reference,
instance_title, software_release, software_type, server, instance_title, software_release, software_type, server,
project_reference): project_reference):
......
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