increase failure information for ip_regex test

It's basically completely impossible to understand why this test would
fail because there is not enough post mortem information. Probably an
address didn't allocate, but this is so stripped down you'd never know
that.

Add further dump on failure to make it possible to see what's happening.

Change-Id: I536f78c77df992dde5efd22b1d763715e33f0769
Related-Bug: #1481715
This commit is contained in:
Sean Dague 2015-08-05 07:11:17 -04:00
parent 4ec06d749a
commit b988e29e91

View File

@ -305,12 +305,20 @@ class ListServerFiltersTestJSON(base.BaseV2ComputeTest):
params = {'ip': ip}
else:
params = {'ip6': ip}
# capture all servers in case something goes wrong
all_servers = self.client.list_servers(detail=True)
body = self.client.list_servers(**params)
servers = body['servers']
self.assertIn(self.s1_name, map(lambda x: x['name'], servers))
self.assertIn(self.s2_name, map(lambda x: x['name'], servers))
self.assertIn(self.s3_name, map(lambda x: x['name'], servers))
self.assertIn(self.s1_name, map(lambda x: x['name'], servers),
"%s not found in %s, all servers %s" %
(self.s1_name, servers, all_servers))
self.assertIn(self.s2_name, map(lambda x: x['name'], servers),
"%s not found in %s, all servers %s" %
(self.s2_name, servers, all_servers))
self.assertIn(self.s3_name, map(lambda x: x['name'], servers),
"%s not found in %s, all servers %s" %
(self.s3_name, servers, all_servers))
@test.idempotent_id('67aec2d0-35fe-4503-9f92-f13272b867ed')
def test_list_servers_detailed_limit_results(self):