refactor: make TestAuthKerberos test pki/pkiz/uuid

This helps us move towards fernet because we don't support bind authentication
with the Fernet provider, so when we set Fernet to be the default we won't run
these tests. We will only run Kerberos tests against token providers that
support it.

Co-Authored-By: Raildo Mascena <raildo@lsd.ufcg.edu.br>
Co-Authored-By: Adam Young <ayound@redhat.com>

Change-Id: Ie80f74e47046c5d8d3c2f31e5b84e4210e775f7f
Partial-Bug: 1561054
This commit is contained in:
Lance Bragstad 2016-07-20 22:43:57 +00:00
parent e9fc581440
commit 66f7b0915b
1 changed files with 28 additions and 2 deletions

View File

@ -3730,15 +3730,41 @@ class TestAuthExternalDefaultDomain(test_v3.RestfulTestCase):
token['bind']['kerberos'])
class TestAuthKerberos(AuthExternalDomainBehavior, test_v3.RestfulTestCase):
class UUIDAuthKerberos(AuthExternalDomainBehavior, test_v3.RestfulTestCase):
def config_overrides(self):
super(TestAuthKerberos, self).config_overrides()
super(UUIDAuthKerberos, self).config_overrides()
self.kerberos = True
self.config_fixture.config(group='token', provider='uuid')
self.auth_plugin_config_override(
methods=['kerberos', 'password', 'token'])
class PKIAuthKerberos(AuthExternalDomainBehavior, test_v3.RestfulTestCase):
def config_overrides(self):
super(PKIAuthKerberos, self).config_overrides()
self.kerberos = True
self.config_fixture.config(group='token', provider='pki')
self.auth_plugin_config_override(
methods=['kerberos', 'password', 'token'])
class PKIZAuthKerberos(AuthExternalDomainBehavior, test_v3.RestfulTestCase):
def config_overrides(self):
super(PKIZAuthKerberos, self).config_overrides()
self.kerberos = True
self.config_fixture.config(group='token', provider='pkiz')
self.auth_plugin_config_override(
methods=['kerberos', 'password', 'token'])
# NOTE(lbragstad): The Fernet token provider doesn't support bind
# authentication so we don't inherit AuthExternalDomainBehavior here to test
# it.
class TestAuthJSONExternal(test_v3.RestfulTestCase):
content_type = 'json'