Fix test_admin_catalog_list

This commit fixes test_admin_catalog_list() so that it tests more
specific details of the admin catalog. It also removes the test's
dependency on each table in the output having a service label. This
dependency was occasionally causing a failure if the test ran at the
same time as the keystone api tests.

Fixes bug 1217159

Change-Id: I4446abb86a3f1f6514fc9de1d00c06f82943b9d9
This commit is contained in:
Matthew Treinish 2013-08-28 19:07:30 -04:00
parent 14845af364
commit 49681808e7

View File

@ -46,9 +46,12 @@ class SimpleReadOnlyKeystoneClientTest(tempest.cli.ClientTestBase):
out = self.keystone('catalog')
catalog = self.parser.details_multiple(out, with_label=True)
for svc in catalog:
if svc.get('__label'):
self.assertTrue(svc['__label'].startswith('Service:'),
msg=('Invalid beginning of service block: %s' %
svc['__label']))
msg=('Invalid beginning of service block: '
'%s' % svc['__label']))
self.assertIn('id', svc.keys())
self.assertIn('region', svc.keys())
def test_admin_endpoint_list(self):
out = self.keystone('endpoint-list')