Fix unstable assertion in test_cinder_endpoints
In simple_read_only.test_cinder.test_cinder_endpoints, the test case assumes that the first table of 'cinder endpoints' always ['nova', 'Value']. However, it is sometimes wrong. So in this commit, the test verifies that they have 2 or more headers and has a 'Value' header. Change-Id: Idb3f2ebc6b7e05178621ac3701b7c3d02e1d7591 Closes-Bug: #1363018 Closes-Bug: #1362703
This commit is contained in:
parent
d93812494a
commit
47a2e72693
@ -121,8 +121,12 @@ class SimpleReadOnlyCinderClientTest(cli.ClientTestBase):
|
||||
self.assertTableStruct(zone_list, ['Name', 'Status'])
|
||||
|
||||
def test_cinder_endpoints(self):
|
||||
endpoints = self.parser.listing(self.cinder('endpoints'))
|
||||
self.assertTableStruct(endpoints, ['nova', 'Value'])
|
||||
out = self.cinder('endpoints')
|
||||
tables = self.parser.tables(out)
|
||||
for table in tables:
|
||||
headers = table['headers']
|
||||
self.assertTrue(2 >= len(headers))
|
||||
self.assertEqual('Value', headers[1])
|
||||
|
||||
def test_cinder_service_list(self):
|
||||
service_list = self.parser.listing(self.cinder('service-list'))
|
||||
|
Loading…
Reference in New Issue
Block a user