From 94a750dbe84a7d557500ccc214a590d186a73437 Mon Sep 17 00:00:00 2001 From: Alin Balutoiu Date: Fri, 28 Aug 2015 14:39:22 +0300 Subject: [PATCH] Tempest: wrong assertion on the number of shares created Two of the tests targeting share listing contain a wrong assertion on the number of existing shares. It is asserted that more than one shares exist, while in case snapshot tests are disabled, only one share is created during resource setup. This patch fixes those tests by lowering the expected minimum number of shares to 1. Change-Id: I28c5d7d61425c20a657af25532e5495b2ebea360 Closes-Bug: #1489846 --- contrib/tempest/tempest/api/share/admin/test_shares_actions.py | 2 +- contrib/tempest/tempest/api/share/test_shares_actions.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/tempest/tempest/api/share/admin/test_shares_actions.py b/contrib/tempest/tempest/api/share/admin/test_shares_actions.py index 60b9fe07bd..2a1d2f2428 100644 --- a/contrib/tempest/tempest/api/share/admin/test_shares_actions.py +++ b/contrib/tempest/tempest/api/share/admin/test_shares_actions.py @@ -246,7 +246,7 @@ class SharesActionsAdminTest(base.BaseSharesAdminTest): shares = self.shares_client.list_shares_with_detail(params=filters) # verify response - self.assertTrue(len(shares) > 1) + self.assertTrue(len(shares) > 0) for share in shares: self.assertEqual( filters['share_network_id'], share['share_network_id']) diff --git a/contrib/tempest/tempest/api/share/test_shares_actions.py b/contrib/tempest/tempest/api/share/test_shares_actions.py index b76c24b09e..30cfd76274 100644 --- a/contrib/tempest/tempest/api/share/test_shares_actions.py +++ b/contrib/tempest/tempest/api/share/test_shares_actions.py @@ -173,7 +173,7 @@ class SharesActionsTest(base.BaseSharesTest): shares = self.shares_client.list_shares_with_detail(params=filters) # verify response - self.assertTrue(len(shares) > 1) + self.assertTrue(len(shares) > 0) for share in shares: self.assertEqual( filters['share_network_id'], share['share_network_id'])