Fix usage of tenant_id in tests
Some tests assume that the base test classes
set a tenant_id parameter at the class level.
This is not the case because base test classes
most often are capable of dealing with multiple
tenants via tempest's test credential framework.
Change-Id: If9b57f0f78c43d5f17738f13cc86b0594d3d2994
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
diff --git a/manila_tempest_tests/tests/api/test_quotas.py b/manila_tempest_tests/tests/api/test_quotas.py
index 32152e0..97780ad 100644
--- a/manila_tempest_tests/tests/api/test_quotas.py
+++ b/manila_tempest_tests/tests/api/test_quotas.py
@@ -35,8 +35,8 @@
msg = "Quota tests are disabled."
raise cls.skipException(msg)
super(SharesQuotasTest, cls).resource_setup()
- cls.user_id = cls.shares_v2_client.user_id or cls.user_id
- cls.tenant_id = cls.shares_v2_client.tenant_id or cls.tenant_id
+ cls.user_id = cls.shares_v2_client.user_id
+ cls.tenant_id = cls.shares_v2_client.tenant_id
@tc.attr(base.TAG_POSITIVE, base.TAG_API)
@ddt.data('shares_client', 'shares_v2_client')
diff --git a/manila_tempest_tests/tests/api/test_rules.py b/manila_tempest_tests/tests/api/test_rules.py
index 42d654e..337eca8 100644
--- a/manila_tempest_tests/tests/api/test_rules.py
+++ b/manila_tempest_tests/tests/api/test_rules.py
@@ -505,7 +505,7 @@
# Create a new user in the current project
project = self.os_admin.projects_client.show_project(
- self.tenant_id)['project']
+ self.shares_v2_client.tenant_id)['project']
user_client = self.create_user_and_get_client(project)
# Create second share by the new user