Do not delete server when task state is image_snapshot
test_delete_saving_image fails when deleting server while server is in task_state image_snapshot, so this is to wait for the server image-snapshotting to be finished before deleting the server. Change-Id: I09e0a796ede5509b84bd844488444d77f1763418 Closes-Bug: #1839048
This commit is contained in:
parent
0a0f5c6e0b
commit
c3cd87a6ed
@ -47,6 +47,10 @@ class ImagesTestJSON(base.BaseV2ComputeTest):
|
||||
def test_delete_saving_image(self):
|
||||
server = self.create_test_server(wait_until='ACTIVE')
|
||||
self.addCleanup(self.servers_client.delete_server, server['id'])
|
||||
# wait for server active to avoid conflict when deleting server
|
||||
# in task_state image_snapshot
|
||||
self.addCleanup(waiters.wait_for_server_status, self.servers_client,
|
||||
server['id'], 'ACTIVE')
|
||||
image = self.create_image_from_server(server['id'],
|
||||
wait_until='SAVING')
|
||||
self.client.delete_image(image['id'])
|
||||
|
Loading…
Reference in New Issue
Block a user