Commit 4387416d authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: test: slave are not directly invalidated as soon as it is destroyed

parent d567bd7c
......@@ -76,44 +76,6 @@ class TestSlapOSCoreSlapOSCloudInteractionWorkflow(SlapOSTestCaseMixin):
def test_SlaveInstance_validate(self):
return self.check_Instance_validate("Slave Instance")
def test_SlaveInstance_requestDestroy(self):
project = self.addProject()
self.person_user = self.makePerson(project)
self.login(self.person_user.getUserId())
# Instance Tree required for security.
hs = self.portal.instance_tree_module.newContent(
portal_type='Instance Tree',
title="HS %s for %s" % (self.new_id, self.person_user.getReference()),
reference="TESTHS-%s" % self.new_id,
destination_reference="TESTHS-%s" % self.new_id,
destination_section=self.person_user.getRelativeUrl(),
follow_up_value=project
)
instance = self.portal.software_instance_module.newContent(
portal_type='Slave Instance',
title="Instance %s for %s" % (self.new_id, self.person_user.getReference()),
reference="TESTINST-%s" % self.new_id,
destination_reference="TESTINST-%s" % self.new_id,
destination_section=self.person_user.getRelativeUrl(),
specialise_value=hs,
follow_up_value=project
)
request_kw = dict(
software_release='http://example.org',
software_type='http://example.org',
instance_xml=self.generateSafeXml(),
sla_xml=self.generateSafeXml(),
shared=True,
)
instance.requestStop(**request_kw)
self.assertEqual(instance.getValidationState(), 'draft')
instance.validate()
self.assertEqual(instance.getValidationState(), 'validated')
instance.requestDestroy(**request_kw)
self.assertEqual(instance.getValidationState(), 'invalidated')
def check_SoftwareInstallation_changeState(self, method_id):
project = self.addProject()
self.person_user = self.makePerson(project)
......
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