Remove system scope token usage
Designate (like any other services) does not support the system
scope and now we are enabling the new defaults by default
- https://review.opendev.org/c/openstack/designate/+/925627
To enable the new defaults, we need to remove the usage of system
scope token from tests otherwise they fails
- https://review.opendev.org/c/openstack/designate/+/926446/
Needed-By: https://review.opendev.org/c/openstack/designate/+/925627
Needed-By: https://review.opendev.org/c/openstack/requirements/+/925464
Change-Id: I8162819f35e7aba5f9c5fab77f0308faf73287ea
diff --git a/designate_tempest_plugin/tests/rbac_utils.py b/designate_tempest_plugin/tests/rbac_utils.py
index aa8bb6a..5638ca4 100644
--- a/designate_tempest_plugin/tests/rbac_utils.py
+++ b/designate_tempest_plugin/tests/rbac_utils.py
@@ -64,18 +64,10 @@
try:
cred_obj = getattr(self, cred)
except AttributeError:
- # TODO(johnsom) Remove once scoped tokens is the default.
- if ((cred == 'os_system_admin' or
- cred == 'os_system_reader') and
- not CONF.enforce_scope.designate):
- LOG.info('Skipping %s allowed RBAC test because '
- 'enforce_scope.designate is not True', cred)
- continue
- else:
- self.fail('Credential {} "expected_allowed" for RBAC '
- 'testing was not created by tempest '
- 'credentials setup. This is likely a bug in the '
- 'test.'.format(cred))
+ self.fail('Credential {} "expected_allowed" for RBAC '
+ 'testing was not created by tempest '
+ 'credentials setup. This is likely a bug in the '
+ 'test.'.format(cred))
method = self._get_client_method(cred_obj, client_str, method_str)
project_id = self._get_client_project_id(cred_obj, client_str)
try:
@@ -277,18 +269,10 @@
try:
cred_obj = getattr(self, cred)
except AttributeError:
- # TODO(johnsom) Remove once scoped tokens is the default.
- if ((cred == 'os_system_admin' or
- cred == 'os_system_reader') and
- not CONF.enforce_scope.designate):
- LOG.info('Skipping %s allowed RBAC test because '
- 'enforce_scope.designate is not True', cred)
- continue
- else:
- self.fail('Credential {} "expected_allowed" for RBAC '
- 'testing was not created by tempest '
- 'credentials setup. This is likely a bug in the '
- 'test.'.format(cred))
+ self.fail('Credential {} "expected_allowed" for RBAC '
+ 'testing was not created by tempest '
+ 'credentials setup. This is likely a bug in the '
+ 'test.'.format(cred))
method = self._get_client_method(cred_obj, client_str, method_str)
try:
# Get the result body
@@ -341,18 +325,10 @@
try:
cred_obj = getattr(self, cred)
except AttributeError:
- # TODO(johnsom) Remove once scoped tokens is the default.
- if ((cred == 'os_system_admin' or
- cred == 'os_system_reader') and
- not CONF.enforce_scope.designate):
- LOG.info('Skipping %s allowed RBAC test because '
- 'enforce_scope.designate is not True', cred)
- continue
- else:
- self.fail('Credential {} "expected_allowed" for RBAC '
- 'testing was not created by tempest '
- 'credentials setup. This is likely a bug in the '
- 'test.'.format(cred))
+ self.fail('Credential {} "expected_allowed" for RBAC '
+ 'testing was not created by tempest '
+ 'credentials setup. This is likely a bug in the '
+ 'test.'.format(cred))
method = self._get_client_method(cred_obj, client_str, method_str)
try:
# Get the result body