Commit 87d8e2bc authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: tests: prevent test to impact other tests

parent fcb26053
......@@ -277,6 +277,7 @@ class TestSlapOSFreeComputePartitionAlarm(SlapOSTestCaseMixin):
self.tic()
try:
# Prevent calling interaction workflows
software_instance.setCategoryList(
software_instance.getCategoryList() + ['aggregate/%s' % partition.getRelativeUrl()]
......@@ -294,6 +295,13 @@ class TestSlapOSFreeComputePartitionAlarm(SlapOSTestCaseMixin):
self.assertEqual(None, software_instance.getAggregate())
self.assertEqual('busy', partition.getSlapState())
self.assertEqual(partition.getRelativeUrl(), software_instance2.getAggregate())
except:
# 2 instances linked to a partition crashes _fillComputeNodeInformationCache
# activity. Clean up to not impact the other tests
software_instance2.setAggregate(None)
raise
finally:
software_instance2.setAggregate(None)
def test_SoftwareInstance_tryToUnallocatePartition_script_notDestroyed(self):
instance_tree = self.addInstanceTree()
......
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