Browse Source

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
changes/73/778573/27
Sam Kumar 2 months ago
committed by Sampat Ponnaganti
parent
commit
f4bae14ce9
3 changed files with 9 additions and 1 deletions
  1. +3
    -0
      patrole_tempest_plugin/tests/api/volume/rbac_base.py
  2. +0
    -1
      patrole_tempest_plugin/tests/api/volume/test_volumes_backup_rbac.py
  3. +6
    -0
      releasenotes/notes/volumes-backup-test-cleanup-7ffa74ae3599e6df.yaml

+ 3
- 0
patrole_tempest_plugin/tests/api/volume/rbac_base.py 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'])


+ 0
- 1
patrole_tempest_plugin/tests/api/volume/test_volumes_backup_rbac.py 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')


+ 6
- 0
releasenotes/notes/volumes-backup-test-cleanup-7ffa74ae3599e6df.yaml 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.

Loading…
Cancel
Save