Bases: keystonemiddleware.tests.unit.utils.MiddlewareTestCase
Bases: keystonemiddleware.tests.unit.utils.BaseTestCase
Bases: keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.BaseAuthTokenMiddlewareTest
Bases: keystonemiddleware.tests.unit.auth_token.base.BaseAuthTokenTestCase
Base test class for auth_token middleware.
All the tests allow for running with auth_token configured for receiving v2 or v3 tokens, with the choice being made by passing configuration data into setUp().
The base class will, by default, run all the tests expecting v2 token formats. Child classes can override this to specify, for instance, v3 format.
Configure the class ready to call the auth_token middleware.
Set up the various fake items needed to run the middleware. Individual tests that need to further refine these can call this function to override the class defaults.
Bases: keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.BaseAuthTokenMiddlewareTest
Bases: object
These tests are run once using v2 tokens and again using v3 tokens.
Test to don’t cache token as invalid on network errors.
We use UUID tokens since they are the easiest one to reach get_http_connection.
Bases: object
Test Composite authentication.
Test the behaviour of adding a service-token.
Bases: object
Base composite auth object with common service token environment.
Bases: keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.CompositeBase, keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.FakeApp
A fake v2 WSGI app protected by composite auth_token middleware.
Bases: keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.BaseAuthTokenMiddlewareTest, testresources.ResourcedTestCase
Test forcing auth_token to use lower api version.
By installing the v3 http hander, auth_token will be get a version list that looks like a v3 server - from which it would normally chose v3.0 as the auth version. However, here we specify v2.0 in the configuration - which should force auth_token to use that version instead.
Bases: keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.BaseAuthTokenMiddlewareTest
Bases: keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.BaseAuthTokenMiddlewareTest, testresources.ResourcedTestCase
Auth Token middleware should understand Diablo keystone responses.
Bases: object
This represents a WSGI app protected by the auth_token middleware.
Bases: keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.BaseAuthTokenMiddlewareTest, testresources.ResourcedTestCase
General Token Behavior tests.
These tests are not affected by the token format (see CommonAuthTokenMiddlewareTest).
Bases: keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.BaseAuthTokenMiddlewareTest
Bases: keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.BaseAuthTokenMiddlewareTest
Bases: fixtures.fixture.Fixture
Bases: fixtures.fixture.Fixture
Bases: keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.BaseAuthTokenMiddlewareTest, testresources.ResourcedTestCase
Bases: keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.V2CertDownloadMiddlewareTest
Bases: keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.BaseAuthTokenMiddlewareTest, keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.CommonAuthTokenMiddlewareTest, testresources.ResourcedTestCase
v2 token specific tests.
There are some differences between how the auth-token middleware handles v2 and v3 tokens over and above the token formats, namely:
The tests below were originally part of the generic AuthTokenMiddlewareTest class, but now, since they really are v2 specific, they are included here.
Unscoped v2 requests with a default tenant should auto-scope.
The implied scope is the user’s tenant ID.
Unscoped requests with no default tenant ID should be rejected.
Bases: keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.BaseAuthTokenMiddlewareTest, keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.CommonCompositeAuthTests, testresources.ResourcedTestCase
Test auth_token middleware with v2 token based composite auth.
Execute the Composite auth class tests, but with the auth_token middleware configured to expect v2 tokens back from a keystone server.
Bases: keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.BaseAuthTokenMiddlewareTest, keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.CommonAuthTokenMiddlewareTest, testresources.ResourcedTestCase
Test auth_token middleware with v3 tokens.
Re-execute the AuthTokenMiddlewareTest class tests, but with the auth_token middleware configured to expect v3 tokens back from a keystone server.
This is done by configuring the AuthTokenMiddlewareTest class via its Setup(), passing in v3 style data that will then be used by the tests themselves. This approach has been used to ensure we really are running the same tests for both v2 and v3 tokens.
There a few additional specific test for v3 only:
Since we don’t specify an auth version for auth_token to use, by definition we are thefore implicitely testing that it will use the highest available auth version, i.e. v3.0
Bases: keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.BaseAuthTokenMiddlewareTest, keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.CommonCompositeAuthTests, testresources.ResourcedTestCase
Test auth_token middleware with v3 token based composite auth.
Execute the Composite auth class tests, but with the auth_token middleware configured to expect v3 tokens back from a keystone server.
Bases: keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.CompositeBase, keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.v3FakeApp
A fake v3 WSGI app protected by composite auth_token middleware.
Bases: keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.FakeApp
This represents a v3 WSGI app protected by the auth_token middleware.
Bases: testtools.testcase.TestCase
Bases: object
Bases: keystonemiddleware.auth_token.BaseAuthProtocol
Bases: keystonemiddleware.tests.unit.auth_token.base.BaseAuthTokenTestCase
These tests will not have the memcache module available.
Bases: keystonemiddleware.tests.unit.auth_token.base.BaseAuthTokenTestCase
Bases: keystonemiddleware.tests.unit.auth_token.base.BaseAuthTokenTestCase
oslo_config_config has precedence over oslo_config_project.
Bases: keystonemiddleware.tests.unit.utils.TestCase
Bases: keystonemiddleware.tests.unit.utils.TestCase
Bases: keystonemiddleware.tests.unit.utils.TestCase
Bases: keystonemiddleware.tests.unit.utils.BaseTestCase
Bases: keystonemiddleware.tests.unit.utils.BaseTestCase
Bases: object
Bases: keystonemiddleware.tests.unit.auth_token.test_user_auth_plugin.BaseUserPluginTests, keystonemiddleware.tests.unit.auth_token.base.BaseAuthTokenTestCase
Bases: keystonemiddleware.tests.unit.auth_token.test_user_auth_plugin.BaseUserPluginTests, keystonemiddleware.tests.unit.auth_token.base.BaseAuthTokenTestCase