From 5eb85674668e46fd657f150c77239b6a980eb2f5 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Sun, 21 May 2017 03:36:23 +0000 Subject: volume functest: ensure snapshots deleted when volume delete Deleting snapshot may take time. The current volume API does not allow to delete volumes with snapshots, so if deleting snapshot may take time, a delete request for a parent volume will fail. This sometimes causes functional test failures in slow environments. wait_for_status() checks whether volume status is in error statuses but previously the expected error status was wrong. Cinder API uses lower case as volume status, so it did not work expectedly. Conflicts: openstackclient/tests/functional/compute/v2/common.py openstackclient/tests/functional/compute/v2/test_server.py openstackclient/tests/functional/volume/v1/test_volume.py openstackclient/tests/functional/volume/v2/test_volume.py openstackclient/tests/functional/volume/v3/common.py Change-Id: I095894ba39f23bf81d71351818d24dbb5ca459fb (cherry picked from commit eeb614c47759fa9a01e6d886ed07acceb8d9ff61) Closes-Bug: #1714977 --- openstackclient/tests/functional/compute/v2/test_server.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'openstackclient/tests/functional/compute') diff --git a/openstackclient/tests/functional/compute/v2/test_server.py b/openstackclient/tests/functional/compute/v2/test_server.py index 119ef05c..4bd7da31 100644 --- a/openstackclient/tests/functional/compute/v2/test_server.py +++ b/openstackclient/tests/functional/compute/v2/test_server.py @@ -16,7 +16,7 @@ import time from tempest.lib.common.utils import data_utils from openstackclient.tests.functional import base -from openstackclient.tests.functional.volume.v2 import test_volume +from openstackclient.tests.functional.volume.v2 import common as volume_common from tempest.lib import exceptions @@ -331,9 +331,7 @@ class ServerTests(base.TestCase): """ # server_image = self.get_image() # get volume status wait function - volume_wait_for = test_volume.VolumeTests( - methodName='wait_for', - ).wait_for + volume_wait_for = volume_common.BaseVolumeTests.wait_for_status # get image size cmd_output = json.loads(self.openstack( -- cgit v1.2.1