diff options
| author | Jenkins <jenkins@review.openstack.org> | 2017-09-26 23:15:31 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2017-09-26 23:15:31 +0000 |
| commit | 2c77aba3633c6ac6a365e0a32f71127a8cbcca38 (patch) | |
| tree | f48ccf988eabe70fc956dc19660bb872ff30ddbc /openstackclient | |
| parent | fe28472b7480435227a7cbf316e36f6453a67f0e (diff) | |
| parent | 844623ccc47a8fc93f8e878376087b69396c4440 (diff) | |
| download | python-openstackclient-2c77aba3633c6ac6a365e0a32f71127a8cbcca38.tar.gz | |
Merge "Add "volume service list --host" functional test case"
Diffstat (limited to 'openstackclient')
| -rw-r--r-- | openstackclient/tests/functional/volume/v2/test_service.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/openstackclient/tests/functional/volume/v2/test_service.py b/openstackclient/tests/functional/volume/v2/test_service.py index 6986fde6..7ec43fe8 100644 --- a/openstackclient/tests/functional/volume/v2/test_service.py +++ b/openstackclient/tests/functional/volume/v2/test_service.py @@ -24,6 +24,7 @@ class VolumeServiceTests(common.BaseVolumeTests): # Get the nonredundant services and hosts services = list(set([x['Binary'] for x in cmd_output])) + hosts = list(set([x['Host'] for x in cmd_output])) # Test volume service list --service cmd_output = json.loads(self.openstack( @@ -37,8 +38,17 @@ class VolumeServiceTests(common.BaseVolumeTests): x['Binary'] ) - # TODO(zhiyong.dai): test volume service list --host after solving - # https://bugs.launchpad.net/python-openstackclient/+bug/1664451 + # Test volume service list --host + cmd_output = json.loads(self.openstack( + 'volume service list -f json ' + + '--host ' + + hosts[0] + )) + for x in cmd_output: + self.assertIn( + hosts[0], + x['Host'] + ) def test_volume_service_set(self): |
