Fix the bug of deleting security group after testing changing password.
When deleting security group before vm is deleted, we will get 'the
security group is in use' error, so this is to add addCleanup to ensure
the vm is deleted before deleting security group.
Closes-Bug:#1826301
Change-Id: I3d4a3816196f42af3ea3f891473d09208651ae68
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
index 93bd817..f6c3e73 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -92,6 +92,7 @@
validatable=True,
validation_resources=validation_resources,
wait_until='ACTIVE')
+ self.addCleanup(self.delete_server, newserver['id'])
# The server's password should be set to the provided password
new_password = 'Newpass1234'
self.client.change_password(newserver['id'], adminPass=new_password)