Skip to content

Commit c8efcc8

Browse files
committed
tests: Remove 'volume service set' functional test
This test disables a cinder and never re-enables it, so it can race with other tests running in parallel, which is the concern raised in review [1]. Since v2 API was removed in Xena, It would be better to delete than to modify it [1] https://review.opendev.org/c/openstack/python-openstackclient/+/957586 Change-Id: If65ca0cf09e6d41a4eec602556e23fc489802d0b Signed-off-by: Park Kyumin <gmpark007@gmail.com>
1 parent caec5c3 commit c8efcc8

1 file changed

Lines changed: 0 additions & 42 deletions

File tree

openstackclient/tests/functional/volume/v2/test_service.py

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -38,45 +38,3 @@ def test_volume_service_list(self):
3838
)
3939
for x in cmd_output:
4040
self.assertIn(hosts[0], x['Host'])
41-
42-
def test_volume_service_set(self):
43-
# Get a service and host
44-
cmd_output = self.openstack(
45-
'volume service list',
46-
parse_output=True,
47-
)
48-
service_1 = cmd_output[0]['Binary']
49-
host_1 = cmd_output[0]['Host']
50-
51-
# Test volume service set --enable
52-
raw_output = self.openstack(
53-
'volume service set --enable ' + host_1 + ' ' + service_1
54-
)
55-
self.assertOutput('', raw_output)
56-
57-
cmd_output = self.openstack(
58-
'volume service list --long',
59-
parse_output=True,
60-
)
61-
self.assertEqual('enabled', cmd_output[0]['Status'])
62-
self.assertIsNone(cmd_output[0]['Disabled Reason'])
63-
64-
# Test volume service set --disable and --disable-reason
65-
disable_reason = 'disable_reason'
66-
raw_output = self.openstack(
67-
'volume service set --disable '
68-
+ '--disable-reason '
69-
+ disable_reason
70-
+ ' '
71-
+ host_1
72-
+ ' '
73-
+ service_1
74-
)
75-
self.assertOutput('', raw_output)
76-
77-
cmd_output = self.openstack(
78-
'volume service list --long',
79-
parse_output=True,
80-
)
81-
self.assertEqual('disabled', cmd_output[0]['Status'])
82-
self.assertEqual(disable_reason, cmd_output[0]['Disabled Reason'])

0 commit comments

Comments
 (0)