Reactivate image before deletion
Normal users should not be able to delete disabled images (see [1]) as this can lead to inconsistencies between database and storage backend. Tempest relies on being able to do this in some tests. [1]: https://bugs.launchpad.net/glance/+bug/1917469 Related-Bug: 1917469 Change-Id: I0b29fe59e238f4c723a15271117e6cfb072e648a
This commit is contained in:
parent
53c02181f8
commit
d05536b958
|
@ -336,6 +336,9 @@ class VolumesNegativeTest(base.BaseVolumeTest):
|
|||
|
||||
# Deactivate the image
|
||||
self.images_client.deactivate_image(image['id'])
|
||||
self.addCleanup(test_utils.call_and_ignore_notfound_exc,
|
||||
self.images_client.reactivate_image, image['id'])
|
||||
|
||||
body = self.images_client.show_image(image['id'])
|
||||
self.assertEqual("deactivated", body['status'])
|
||||
# Try creating a volume from deactivated image
|
||||
|
|
Loading…
Reference in New Issue