Additional Fernet test coverage

This expands existing test coverage to include Fernet tokens, a few of
which expose a couple issues (see related bugs below).

NOTE: The config fixture in keystone/tests/unit/test_v3_auth.py L536
needed to be revised to use a full class path, rather than the
stevedore-based entry point loading introduced to keystone during the
liberty release cycle.

Change-Id: I53374d41e4e5453817b6635aee56df625073d015
Related-Bug: 1459790
Related-Bug: 1475762
(cherry picked from commit a8c57027da)
This commit is contained in:
Dolph Mathews 2015-07-17 19:33:22 +00:00
parent cfbc0f1d19
commit a1e20fbbb5
1 changed files with 35 additions and 0 deletions

View File

@ -32,6 +32,7 @@ from keystone.policy.backends import rules
from keystone.tests import unit as tests
from keystone.tests.unit import ksfixtures
from keystone.tests.unit import test_v3
from keystone.tests.unit import utils as test_utils
CONF = cfg.CONF
@ -527,6 +528,40 @@ class TestUUIDTokenAPIs(test_v3.RestfulTestCase, TokenAPITests):
self.assertFalse(cms.is_asn1_token(token_id))
class TestFernetTokenAPIs(test_v3.RestfulTestCase, TokenAPITests):
def config_overrides(self):
super(TestFernetTokenAPIs, self).config_overrides()
self.config_fixture.config(
group='token',
provider='keystone.token.providers.fernet.Provider')
self.useFixture(ksfixtures.KeyRepository(self.config_fixture))
def setUp(self):
super(TestFernetTokenAPIs, self).setUp()
self.doSetUp()
@test_utils.wip('Failing due to bug 1459790.')
def test_v3_v2_token_intermix(self):
super(TestFernetTokenAPIs, self).test_v3_v2_token_intermix()
@test_utils.wip('Failing due to bug 1459790.')
def test_v3_v2_unscoped_token_intermix(self):
super(TestFernetTokenAPIs, self).test_v3_v2_unscoped_token_intermix()
@test_utils.wip('Failing due to bug 1459790.')
def test_v2_v3_token_intermix(self):
super(TestFernetTokenAPIs, self).test_v2_v3_token_intermix()
@test_utils.wip('Failing due to bug 1459790.')
def test_rescoping_token(self):
super(TestFernetTokenAPIs, self).test_rescoping_token()
@test_utils.wip('Failing due to bug 1475762.')
def test_v3_v2_intermix_non_default_project_failed(self):
super(TestFernetTokenAPIs,
self).test_v3_v2_intermix_non_default_project_failed()
class TestTokenRevokeSelfAndAdmin(test_v3.RestfulTestCase):
"""Test token revoke using v3 Identity API by token owner and admin."""