From 69870ae439f18863979949f5728543a0fb1cbe83 Mon Sep 17 00:00:00 2001 From: Bram Verschueren Date: Fri, 13 Dec 2019 11:13:54 +0100 Subject: Fix faulthy state argument choice The correct state name for a failing volume snapshot deletion is 'error_deleting' instead of 'error-deleting'. [1] [1] https://opendev.org/openstack/cinder/src/commit/89d6a5042fcb2ede5a0b1112d72fae805ea52fcd/cinder/objects/fields.py#L126 Task: #37844 Story: #2007037 Change-Id: Ia99900ece4f1cd29769b22ddaa3965789d719556 --- .../tests/functional/volume/v2/test_volume_snapshot.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'openstackclient/tests') diff --git a/openstackclient/tests/functional/volume/v2/test_volume_snapshot.py b/openstackclient/tests/functional/volume/v2/test_volume_snapshot.py index 8d32d997..4977a73e 100644 --- a/openstackclient/tests/functional/volume/v2/test_volume_snapshot.py +++ b/openstackclient/tests/functional/volume/v2/test_volume_snapshot.py @@ -121,6 +121,24 @@ class VolumeSnapshotTests(common.BaseVolumeTests): cmd_output["size"], ) self.wait_for_status('volume snapshot', name2, 'available') + + raw_output = self.openstack( + 'volume snapshot set ' + + '--state error_deleting ' + + name2 + ) + self.assertOutput('', raw_output) + + # Test list --long, --status + cmd_output = json.loads(self.openstack( + 'volume snapshot list -f json ' + + '--long ' + + '--status error_deleting' + )) + names = [x["Name"] for x in cmd_output] + self.assertNotIn(name1, names) + self.assertIn(name2, names) + raw_output = self.openstack( 'volume snapshot set ' + '--state error ' + -- cgit v1.2.1