Skip test that rely on creds by role
The legacy credential providers raises an exception when is_role_available is invoked. This causes tests that rely on credentials by role to fail rather than skip when that credential provider is used. The wrong behaviour was introduced in change I351f86f0570070105bbf24f2d904e917feea6e57, and since than it's causing periodic and experimental jobs using the legacy credential provider to fail. Fixing that. Change-Id: I0ca0b96fc618ffe60851984a9c6d46b0507878d4
This commit is contained in:
parent
c4dc060b8c
commit
074dee8c76
@ -118,11 +118,11 @@ class LegacyCredentialProvider(cred_provider.CredentialProvider):
|
|||||||
raise exceptions.InvalidConfiguration(msg)
|
raise exceptions.InvalidConfiguration(msg)
|
||||||
|
|
||||||
def is_role_available(self, role):
|
def is_role_available(self, role):
|
||||||
msg = "Credentials being specified through the config file can not be"\
|
# NOTE(andreaf) LegacyCredentialProvider does not support credentials
|
||||||
" used with tests that specify using credentials by roles. "\
|
# by role, so returning always False.
|
||||||
"Either exclude/skip the tests doing this or use either an "\
|
# Test that rely on credentials by role should use this to skip
|
||||||
"test_accounts_file or dynamic credentials."
|
# when this is credential provider is used
|
||||||
raise exceptions.InvalidConfiguration(msg)
|
return False
|
||||||
|
|
||||||
|
|
||||||
# Return the right implementation of CredentialProvider based on config
|
# Return the right implementation of CredentialProvider based on config
|
||||||
|
Loading…
Reference in New Issue
Block a user