Fixed issue with backup delete

1) Updated class level create_backup function to wait for resource delete
2) Switched the wait_for_resource_deletion handler before delete_backup,
   the clean_up function uses list pop() to perform cleanup. The backup
   has to be deleted before the wait_handler is called

Depends-On https://review.opendev.org/c/openstack/tempest/+/781142

https://storyboard.openstack.org/#!/story/2008683

Change-Id: I6ebc6dcb729baa775e36026081cd8bbf0d5c203f
This commit is contained in:
Sam Kumar 2021-03-03 20:21:52 +00:00 committed by Sampat Ponnaganti
parent 43bf0d78b4
commit f4bae14ce9
3 changed files with 9 additions and 1 deletions

View File

@ -64,6 +64,9 @@ class BaseVolumeRbacTest(rbac_utils.RbacUtilsMixin,
backup = backup_client.create_backup(
volume_id=volume_id, **kwargs)['backup']
cls.addClassResourceCleanup(
test_utils.call_and_ignore_notfound_exc,
backup_client.wait_for_resource_deletion, backup['id'])
cls.addClassResourceCleanup(
test_utils.call_and_ignore_notfound_exc,
backup_client.delete_backup, backup['id'])

View File

@ -103,7 +103,6 @@ class VolumesBackupsV3RbacTest(rbac_base.BaseVolumeRbacTest):
backup = self.create_backup(volume_id=self.volume['id'])
waiters.wait_for_volume_resource_status(self.volumes_client,
self.volume['id'], 'available')
with self.override_role():
self.backups_client.reset_backup_status(backup_id=backup['id'],
status='error')

View File

@ -0,0 +1,6 @@
---
fixes:
- |
fixes an issue in VolumesBackupsV3RbacTest.test_reset_backup_status test
where the volume is not registered to be cleaned up after the test.
This fix cleans up the volume.