test_rescued_vm_add_remove_security_group missing addCleanup
test_rescued_vm_add_remove_security_group on failure caused
other test cases fail.
Change-Id: I17ebb23f31bc10d669208b64a66e89fa415f96ac
diff --git a/tempest/api/compute/servers/test_server_rescue.py b/tempest/api/compute/servers/test_server_rescue.py
index 45fe5ac..20c5d7f 100644
--- a/tempest/api/compute/servers/test_server_rescue.py
+++ b/tempest/api/compute/servers/test_server_rescue.py
@@ -212,6 +212,7 @@
self.servers_client.rescue_server(
self.server_id, adminPass=self.password)
self.servers_client.wait_for_server_status(self.server_id, 'RESCUE')
+ self.addCleanup(self._unrescue, self.server_id)
# Add Security group
resp, body = self.servers_client.add_security_group(self.server_id,
@@ -223,11 +224,6 @@
self.sg_name)
self.assertEqual(202, resp.status)
- # Unrescue the server
- resp, body = self.servers_client.unrescue_server(self.server_id)
- self.assertEqual(202, resp.status)
- self.servers_client.wait_for_server_status(self.server_id, 'ACTIVE')
-
class ServerRescueTestXML(ServerRescueTestJSON):
_interface = 'xml'