From b0e4b260a10836adb2135219a1b4d22157e01b83 Mon Sep 17 00:00:00 2001 From: vponomaryov Date: Sat, 20 Dec 2014 13:46:20 +0200 Subject: [PATCH] Fix tempest test with share server listing with no filters We have test in tempest plugin that gets list of share servers and verifies server being used is present, but also verifies that all share servers have some specific states. It is incorrect because share servers from whole cluster are taken. And these 'all' share servers are not related to test. Change-Id: Iae849cb64ca36448eb5fa28a2075de614fea475c --- .../tempest/api/share/admin/test_share_servers.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/contrib/tempest/tempest/api/share/admin/test_share_servers.py b/contrib/tempest/tempest/api/share/admin/test_share_servers.py index 4279ec0563..61a1880429 100644 --- a/contrib/tempest/tempest/api/share/admin/test_share_servers.py +++ b/contrib/tempest/tempest/api/share/admin/test_share_servers.py @@ -73,13 +73,10 @@ class ShareServersAdminTest(base.BaseSharesAdminTest): # Project id is not empty self.assertTrue(len(server["project_id"]) > 0) + # Do not verify statuses because we get all share servers from whole + # cluster and here can be servers with any state. # Server we used is present. - # Use 'allowed_statuses' to cover possible statuses of share servers - # in general, because we get info for whole cluster. - allowed_statuses = ["active", "creating", "deleting"] - any((s["share_network_name"] in self.sn_name_and_id and - self.assertIn(s["status"].lower(), - allowed_statuses)) for s in servers) + any(s["share_network_name"] in self.sn_name_and_id for s in servers) @test.attr(type=["gate", "smoke", ]) def test_list_share_servers_with_host_filter(self):