From e49d39cde035a153fce4a1a456d74bd71b2ab353 Mon Sep 17 00:00:00 2001 From: Valeriy Ponomaryov Date: Wed, 15 Jun 2016 18:53:44 +0300 Subject: [PATCH] [Tempest] Fix negative replication test Test "test_try_add_replica_to_share_with_no_replication_share_type" located in "manila_tempest_tests/tests/api/test_replication_negative.py" tries to verify that replica cannot be created on share that was created using share type without replication suppport. But it uses default share type that can have anything configured in it. Therefore, make this test create share type for its needs. Change-Id: I8d27e2522a973350b287fc53d052726044465168 Closes-Bug: #1592874 --- manila_tempest_tests/tests/api/test_replication_negative.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/manila_tempest_tests/tests/api/test_replication_negative.py b/manila_tempest_tests/tests/api/test_replication_negative.py index ca91636204..e6a1719002 100644 --- a/manila_tempest_tests/tests/api/test_replication_negative.py +++ b/manila_tempest_tests/tests/api/test_replication_negative.py @@ -78,7 +78,11 @@ class ReplicationNegativeTest(base.BaseSharesMixedTest): @test.attr(type=[base.TAG_NEGATIVE, base.TAG_API_WITH_BACKEND]) def test_try_add_replica_to_share_with_no_replication_share_type(self): # Create share without replication type - share = self.create_share() + share_type = self.create_share_type( + data_utils.rand_name(constants.TEMPEST_MANILA_PREFIX), + extra_specs=self.add_required_extra_specs_to_dict(), + client=self.admin_client)["share_type"] + share = self.create_share(share_type_id=share_type["id"]) self.assertRaises(lib_exc.BadRequest, self.create_share_replica, share['id'],