Skip tests in TrustsV3TestJSON with immutable user source

Adds a simple condition in skip_checks to skip the entire test class
if the environment is configured to have an immutable user source. If
so, a skipException is raised and the entire class is not executed.

Partial-Bug: 1777047

Change-Id: I8c1c1df25401157c667bce97d4995f738eec8e05
This commit is contained in:
Leo Henken 2019-07-12 10:42:58 -05:00
parent ef47489dc1
commit bae11b6dc0
1 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,10 @@ class TrustsV3TestJSON(base.BaseIdentityV3AdminTest):
super(TrustsV3TestJSON, cls).skip_checks()
if not CONF.identity_feature_enabled.trust:
raise cls.skipException("Trusts aren't enabled")
if CONF.identity_feature_enabled.immutable_user_source:
raise cls.skipException('Skipped because environment has an '
'immutable user source and solely '
'provides read-only access to users.')
def setUp(self):
super(TrustsV3TestJSON, self).setUp()