From b988e29e9184438b6f53cf8f7acec5d7b8414d36 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 5 Aug 2015 07:11:17 -0400 Subject: [PATCH] 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 --- .../compute/servers/test_list_server_filters.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tempest/api/compute/servers/test_list_server_filters.py b/tempest/api/compute/servers/test_list_server_filters.py index a75cb3ea8f..616084454e 100644 --- a/tempest/api/compute/servers/test_list_server_filters.py +++ b/tempest/api/compute/servers/test_list_server_filters.py @@ -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):