[Tempest] Fix visibility of test_quotas.py module
Commit [1] added wrong decorator to test class located in
"manila_tempest_tests/tests/api/test_quotas.py" module that
made it invisible for tempest.
It should be "ddt.ddt" instead of "ddt.data" as it is now.
Also, fix negative quota tests that were testing wrong thing.
It should have been testing "quota-sets" and "os-quota-sets", not
"services" and "os-services" as it is now.
[1] I82f00114db985b4b3bf4db0a64191559508ac600
Change-Id: Ie0eb7d32b7b032ffdb7f7dd47f68841211e7d7a6
Closes-Bug: #1635588
diff --git a/manila_tempest_tests/tests/api/base.py b/manila_tempest_tests/tests/api/base.py
index 6b48348..7bb727d 100644
--- a/manila_tempest_tests/tests/api/base.py
+++ b/manila_tempest_tests/tests/api/base.py
@@ -231,6 +231,14 @@
super(BaseSharesTest, cls).setup_clients()
os = getattr(cls, 'os_%s' % cls.credentials[0])
os.shares_client = shares_client.SharesClient(os.auth_provider)
+
+ if CONF.identity.auth_version == 'v3':
+ project_id = os.auth_provider.auth_data[1]['project']['id']
+ else:
+ project_id = os.auth_provider.auth_data[1]['token']['tenant']['id']
+ cls.tenant_id = project_id
+ cls.user_id = os.auth_provider.auth_data[1]['user']['id']
+
cls.shares_client = os.shares_client
os.shares_v2_client = shares_v2_client.SharesV2Client(
os.auth_provider)