File tree Expand file tree Collapse file tree
openstackclient/tests/functional/volume/v2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ def test_volume_service_list(self):
2424
2525 # Get the nonredundant services and hosts
2626 services = list (set ([x ['Binary' ] for x in cmd_output ]))
27+ hosts = list (set ([x ['Host' ] for x in cmd_output ]))
2728
2829 # Test volume service list --service
2930 cmd_output = json .loads (self .openstack (
@@ -37,8 +38,17 @@ def test_volume_service_list(self):
3738 x ['Binary' ]
3839 )
3940
40- # TODO(zhiyong.dai): test volume service list --host after solving
41- # https://bugs.launchpad.net/python-openstackclient/+bug/1664451
41+ # Test volume service list --host
42+ cmd_output = json .loads (self .openstack (
43+ 'volume service list -f json ' +
44+ '--host ' +
45+ hosts [0 ]
46+ ))
47+ for x in cmd_output :
48+ self .assertIn (
49+ hosts [0 ],
50+ x ['Host' ]
51+ )
4252
4353 def test_volume_service_set (self ):
4454
You can’t perform that action at this time.
0 commit comments