Merge "Add "volume service list --host" functional test case"
This commit is contained in:
		| @@ -24,6 +24,7 @@ class VolumeServiceTests(common.BaseVolumeTests): | |||||||
|  |  | ||||||
|         # Get the nonredundant services and hosts |         # Get the nonredundant services and hosts | ||||||
|         services = list(set([x['Binary'] for x in cmd_output])) |         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 |         # Test volume service list --service | ||||||
|         cmd_output = json.loads(self.openstack( |         cmd_output = json.loads(self.openstack( | ||||||
| @@ -37,8 +38,17 @@ class VolumeServiceTests(common.BaseVolumeTests): | |||||||
|                 x['Binary'] |                 x['Binary'] | ||||||
|             ) |             ) | ||||||
|  |  | ||||||
|         # TODO(zhiyong.dai): test volume service list --host after solving |         # Test volume service list --host | ||||||
|         # https://bugs.launchpad.net/python-openstackclient/+bug/1664451 |         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): |     def test_volume_service_set(self): | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jenkins
					Jenkins