Deacrease the required image store size by 4 GiB
The test_volumes_actions inreased the volume size by 1 before,
upload the volume to the image store.
This test run with xml/json and with volume v1/v2 api version,
so it is 4 in total.
This change decreases the theoretical maximum image store size,
consumed by the test suite in a parallel run.
This change does the followings:
* The extend test cases moved to dedicated file.
* The image deletion now a waited action,
so the image delteion needs to be comploted before the
next test.
* Use HEAD instead of get for checking image deletion,
in order to avoid full image download just for status check.
Change-Id: I982d783312eef5b18dc7518e119b0aa018a195d5
Related-Bug: #1347692
diff --git a/tempest/api/volume/test_volumes_actions.py b/tempest/api/volume/test_volumes_actions.py
index 6fef564..0f92f01 100644
--- a/tempest/api/volume/test_volumes_actions.py
+++ b/tempest/api/volume/test_volumes_actions.py
@@ -40,6 +40,10 @@
# Create a test shared volume for attach/detach tests
cls.volume = cls.create_volume()
+ def _delete_image_with_wait(self, image_id):
+ self.image_client.delete_image(image_id)
+ self.image_client.wait_for_resource_deletion(image_id)
+
@classmethod
def tearDownClass(cls):
# Delete the test instance
@@ -101,23 +105,12 @@
image_name,
CONF.volume.disk_format)
image_id = body["image_id"]
- self.addCleanup(self.image_client.delete_image, image_id)
+ self.addCleanup(self._delete_image_with_wait, image_id)
self.assertEqual(202, resp.status)
self.image_client.wait_for_image_status(image_id, 'active')
self.client.wait_for_volume_status(self.volume['id'], 'available')
@test.attr(type='gate')
- def test_volume_extend(self):
- # Extend Volume Test.
- extend_size = int(self.volume['size']) + 1
- resp, body = self.client.extend_volume(self.volume['id'], extend_size)
- self.assertEqual(202, resp.status)
- self.client.wait_for_volume_status(self.volume['id'], 'available')
- resp, volume = self.client.get_volume(self.volume['id'])
- self.assertEqual(200, resp.status)
- self.assertEqual(int(volume['size']), extend_size)
-
- @test.attr(type='gate')
def test_reserve_unreserve_volume(self):
# Mark volume as reserved.
resp, body = self.client.reserve_volume(self.volume['id'])