Merge "[Share Groups] Fix creation of share group types with wrong specs values"
diff --git a/manila_tempest_tests/tests/api/admin/test_share_group_types_negative.py b/manila_tempest_tests/tests/api/admin/test_share_group_types_negative.py
index 18e8cdd..6dfe204 100644
--- a/manila_tempest_tests/tests/api/admin/test_share_group_types_negative.py
+++ b/manila_tempest_tests/tests/api/admin/test_share_group_types_negative.py
@@ -70,6 +70,15 @@
"x" * 256, client=self.admin_shares_v2_client)
@tc.attr(base.TAG_NEGATIVE, base.TAG_API)
+ def test_create_share_group_type_with_wrong_value_for_group_specs(self):
+ self.assertRaises(
+ lib_exc.BadRequest,
+ self.admin_shares_v2_client.create_share_group_type,
+ name=data_utils.rand_name("tempest_manila"),
+ share_types=[self.share_type['share_type']['id']],
+ group_specs="expecting_error_code_400")
+
+ @tc.attr(base.TAG_NEGATIVE, base.TAG_API)
def test_get_share_group_type_using_nonexistent_id(self):
self.assertRaises(
lib_exc.NotFound,
diff --git a/manila_tempest_tests/tests/api/base.py b/manila_tempest_tests/tests/api/base.py
index 236351d..3df7153 100644
--- a/manila_tempest_tests/tests/api/base.py
+++ b/manila_tempest_tests/tests/api/base.py
@@ -595,7 +595,8 @@
group_specs=None, client=None,
cleanup_in_class=True, **kwargs):
client = client or cls.shares_v2_client
- if group_specs is None:
+ if (group_specs is None and
+ CONF.share.capability_sg_consistent_snapshot_support):
group_specs = {
'consistent_snapshot_support': (
CONF.share.capability_sg_consistent_snapshot_support),