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
This commit is contained in:
zhangyangyang
2019-04-24 18:54:52 +08:00
parent 682965e392
commit c248f5962e

View File

@@ -92,6 +92,7 @@ class ServerActionsTestJSON(base.BaseV2ComputeTest):
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)