Merge "Add wait for location import task"

This commit is contained in:
Zuul 2024-05-03 20:45:30 +00:00 committed by Gerrit Code Review
commit dba5f5cdde
1 changed files with 7 additions and 0 deletions

View File

@ -119,6 +119,13 @@ class VolumesActionsTest(base.BaseVolumeTest):
self.images_client.delete_image,
image_id)
waiters.wait_for_image_status(self.images_client, image_id, 'active')
# This is required for the optimized upload volume path.
# New location APIs are async so we need to wait for the location
# import task to complete.
# This should work with old location API since we don't fail if there
# are no tasks for the image
waiters.wait_for_image_tasks_status(self.images_client,
image_id, 'success')
waiters.wait_for_volume_resource_status(self.volumes_client,
self.volume['id'], 'available')