From eeb614c47759fa9a01e6d886ed07acceb8d9ff61 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. Change-Id: I095894ba39f23bf81d71351818d24dbb5ca459fb --- openstackclient/tests/functional/compute/v2/common.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'openstackclient/tests/functional/compute/v2/common.py') diff --git a/openstackclient/tests/functional/compute/v2/common.py b/openstackclient/tests/functional/compute/v2/common.py index 99d87bb4..851664c8 100644 --- a/openstackclient/tests/functional/compute/v2/common.py +++ b/openstackclient/tests/functional/compute/v2/common.py @@ -125,12 +125,12 @@ class ComputeTestCase(base.TestCase): name )) status = cmd_output['status'] - print('Waiting for {}, current status: {}'.format( - expected_status, - status, - )) if status == expected_status: + print('Server {} now has status {}'.format( + name, status)) break + print('Server {}: Waiting for {}, current status: {}'.format( + name, expected_status, status)) self.assertNotIn(status, failures) time.sleep(interval) total_sleep += interval -- cgit v1.2.1