From bef40b3f80c1fed866bebfa6b2a7dafe101d44ad Mon Sep 17 00:00:00 2001 From: Felipe Rodrigues Date: Tue, 10 Aug 2021 22:00:21 -0300 Subject: [PATCH] Fix tests creating share without using share_size Some tests from share group and replication are not creating share following the `share_size` tempest CONF. This patch fixed them applying that configuration. Change-Id: If525e97a5d456d6ddebb4bf9bc8ff6190c95a555 --- .../tests/api/admin/test_replication_actions.py | 4 ++-- manila_tempest_tests/tests/api/test_share_group_actions.py | 4 ++-- manila_tempest_tests/tests/api/test_share_groups_negative.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/manila_tempest_tests/tests/api/admin/test_replication_actions.py b/manila_tempest_tests/tests/api/admin/test_replication_actions.py index ba8d63b3..6d71476c 100644 --- a/manila_tempest_tests/tests/api/admin/test_replication_actions.py +++ b/manila_tempest_tests/tests/api/admin/test_replication_actions.py @@ -114,7 +114,7 @@ class ReplicationActionsAdminTest(base.BaseSharesMixedTest): def test_manage_share_for_replication_type(self): """Manage a share with replication share type.""" # Create a share and unmanage it - share = self.create_share(size=2, + share = self.create_share(size=CONF.share.share_size, share_type_id=self.share_type_id, availability_zone=self.share_zone, share_network_id=self.sn_id, @@ -164,7 +164,7 @@ class ReplicationActionsAdminTest(base.BaseSharesMixedTest): 'Manage/Unmanage Tests are disabled.') def test_unmanage_replicated_share_with_no_replica(self): """Unmanage a replication type share that does not have replica.""" - share = self.create_share(size=2, + share = self.create_share(size=CONF.share.share_size, share_type_id=self.share_type_id, share_network_id=self.sn_id, availability_zone=self.share_zone, diff --git a/manila_tempest_tests/tests/api/test_share_group_actions.py b/manila_tempest_tests/tests/api/test_share_group_actions.py index 680b5657..a07e99ff 100644 --- a/manila_tempest_tests/tests/api/test_share_group_actions.py +++ b/manila_tempest_tests/tests/api/test_share_group_actions.py @@ -80,8 +80,8 @@ class ShareGroupActionsTest(base.BaseSharesMixedTest): # Create 2 shares - inside first and second share groups cls.share_name = data_utils.rand_name("tempest-share-name") cls.share_desc = data_utils.rand_name("tempest-share-description") - cls.share_size = 1 - cls.share_size2 = 2 + cls.share_size = CONF.share.share_size + cls.share_size2 = CONF.share.share_size + 2 cls.shares = cls.create_shares([ {'kwargs': { 'name': cls.share_name, diff --git a/manila_tempest_tests/tests/api/test_share_groups_negative.py b/manila_tempest_tests/tests/api/test_share_groups_negative.py index 68fb18f0..c45cc95f 100644 --- a/manila_tempest_tests/tests/api/test_share_groups_negative.py +++ b/manila_tempest_tests/tests/api/test_share_groups_negative.py @@ -65,7 +65,7 @@ class ShareGroupsNegativeTest(base.BaseSharesMixedTest): # Create a share in the share group cls.share_name = data_utils.rand_name("tempest-share-name") cls.share_desc = data_utils.rand_name("tempest-share-description") - cls.share_size = 1 + cls.share_size = CONF.share.share_size cls.share = cls.create_share( name=cls.share_name, description=cls.share_desc,