Bases: testtools.testcase.TestCase
Light weight base test class.
This is a placeholder that will eventually go away once thc setup/teardown in TestCase is properly trimmed down to the bare essentials. This is really just a play to speed up the tests by eliminating unnecessary work.
Bases: object
A mixin for consolidating sql-specific test overrides.
Bases: keystone.tests.core.BaseTestCase
Asserts that two datetimes are nearly equal within a small delta.
| Parameters: | delta – Maximum allowable time delta, defined in seconds. |
|---|
Checks whether actual is a superset of expected.
Asserts that the message in a raised exception matches a regexp.
This decorator is used to skip a test if caching is disabled either globally or for the specific section.
In the code fragment:
@skip_if_cache_is_disabled('assignment', 'token')
def test_method(*args):
...
The method test_method would be skipped if caching is disabled globally via the enabled option in the cache section of the configuration or if the caching option is set to false in either assignment or token sections of the configuration. This decorator can be used with no arguments to only check global caching.
If a specified configuration section does not define the caching option, this decorator makes the same assumption as the should_cache_fn in keystone.common.cache that caching should be enabled.
Fake LDAP server for test harness.
This class does very little error checking, and knows nothing about ldap class definitions. It implements the minimum emulation of the python ldap library to work with nova.
Bases: object
Fake LDAP connection.
Modify the object at dn using the attribute list.
| Parameters: |
|
|---|
Fixtures for Federation Mapping.
Bases: keystone.tests.core.TestCase
Performs restful tests against the WSGI app over HTTP.
This class launches public & admin WSGI servers for every test, which can be accessed by calling public_request() or admin_request(), respectfully.
restful_request() and request() methods are also exposed if you need to bypass restful conventions or access HTTP details in your test implementation.
Three new asserts are provided:
unless an expected_status is provided
if an expected_status is provided
appear as expected
Requests are automatically serialized according to the defined content_type. Responses are automatically deserialized as well, and available in the response.body attribute. The original body content is available in the response.raw attribute.
Asserts a specific status code on the response.
| Parameters: |
|
|---|
example:
self.assertResponseStatus(response, 203)
Asserts that a status code lies inside the 2xx range.
| Parameters: | response – httplib.HTTPResponse to be verified to have a status code between 200 and 299. |
|---|
example:
self.assertResponseSuccessful(response, 203)
Verify that the error response is valid.
Subclasses can override this function based on the expected response.
Convenience method so that we can test authenticated requests.
Bases: keystone.tests.test_associate_project_endpoint_extension.TestExtensionCase
Test OS-EP-FILTER endpoint to project associations extension.
HEAD /OS-EP-FILTER/projects/{project_id}/endpoints/{endpoint_id}
Valid project and endpoint id test case.
HEAD /OS-EP-FILTER/projects/{project_id}/endpoints/{endpoint_id}
Invalid endpoint id test case.
HEAD /OS-EP-FILTER/projects/{project_id}/endpoints/{endpoint_id}
Invalid project id test case.
PUT /OS-EP-FILTER/projects/{project_id}/endpoints/{endpoint_id}
Valid endpoint and project id test case.
PUT /OS-EP-FILTER/projects/{project_id}/endpoints/{endpoint_id}
Invalid endpoint id test case.
PUT OS-EP-FILTER/projects/{project_id}/endpoints/{endpoint_id}
Invalid project id test case.
PUT /OS-EP-FILTER/projects/{project_id}/endpoints/{endpoint_id}
Unexpected body in request. The body should be ignored.
GET /OS-EP-FILTER/projects/{project_id}/endpoints success.
GET /OS-EP-FILTER/projects/{project_id}/endpoints no project.
GET /OS-EP-FILTER/endpoints/{endpoint_id}/projects success
Associate default project and endpoint, then get it.
GET /OS-EP-FILTER/endpoints/{endpoint_id}/projects success
Don’t associate project and endpoint, then get empty list.
GET /OS-EP-FILTER/endpoints/{endpoint_id}/projects
Invalid endpoint id test case.
DELETE /OS-EP-FILTER/projects/{project_id}/endpoints/{endpoint_id}
Valid project id and endpoint id test case.
Bases: keystone.tests.test_associate_project_endpoint_extension.TestExtensionCase
Test OS-EP-FILTER catalog filtering extension.
Bases: keystone.tests.test_v3.RestfulTestCase
Bases: keystone.tests.test_auth.AuthTest
Verify sending empty json dict raises the right exception.
Verify sending invalid ‘auth’ raises the right exception.
Verify sending large ‘password’ raises the right exception.
Verify sending large ‘tenantId’ raises the right exception.
Verify sending large ‘tenantName’ raises the right exception.
Verify sending large ‘token’ raises the right exception.
Verify sending large ‘userId’ raises the right exception.
Verify sending large ‘username’ raises the right exception.
Bases: keystone.tests.core.SQLDriverOverrides, keystone.tests.test_auth.AuthTest
Tests for the catalog provided in the auth response.
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.test_auth.AuthTest
Verify getting a token in cross domain group/project roles.
Verify getting an unscoped token with an unscoped token.
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.test_auth_plugin.SimpleChallengeResponse
Duplicate simple challenge response auth plugin.
Bases: keystone.tests.test_auth_plugin.SimpleChallengeResponse
Bases: keystone.auth.core.AuthMethodHandler
An auth plugin that does not supply a method attribute.
Bases: keystone.auth.core.AuthMethodHandler
Bases: keystone.tests.core.SQLDriverOverrides, keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Bases: object
Get back only enabled endpoints when get the v2 catalog.
Bases: object
Test for get role by user and project, user was added into a group.
Test Plan:
Test for getting roles for user on a domain.
Test Plan:
Test errors raised when getting roles for user on a domain.
Test Plan:
When a user has the same ID as a group, get_roles_for_user_and_project returns only the roles for the user and not the group.
Test for unfiltered listing role assignments.
Test Plan:
Test multiple group roles for user on project and domain.
Test Plan:
Bases: object
Test inherited group roles.
Test Plan:
Test inherited user roles.
Test Plan:
Test inherited group roles.
Test Plan:
Test inherited group roles.
Test Plan:
Bases: keystone.tests.filtering.FilterTests
Bases: object
Bases: keystone.tests.core.TestCase, keystone.tests.test_backend.CatalogTests
Bases: keystone.tests.core.TestCase, keystone.tests.test_backend.IdentityTests
Bases: keystone.tests.core.TestCase, keystone.tests.test_backend.TokenTests
Bases: keystone.tests.core.TestCase, keystone.tests.test_backend.TokenCacheInvalidation
Bases: keystone.tests.core.TestCase, keystone.tests.test_backend.TrustTests
Bases: keystone.tests.test_backend.IdentityTests
List group members with deleted user.
If a group has a deleted entry for a member, the non-deleted members are returned.
Bases: keystone.tests.test_backend_ldap.BaseLDAPIdentity, keystone.tests.core.TestCase
Bases: keystone.tests.test_backend_ldap.BaseLDAPIdentity, keystone.tests.core.SQLDriverOverrides, keystone.tests.core.TestCase
Bases: keystone.tests.test_backend_ldap.BaseLDAPIdentity, keystone.tests.core.SQLDriverOverrides, keystone.tests.core.TestCase
Class to test common SQL plus individual LDAP backends.
We define a set of domains and domain-specific backends:
Normally one would expect that the default domain would be handled as part of the “other domains” - however the above provides better test coverage since most of the existing backend tests use the default domain.
Test that separate configs have segregated the domain.
Test Plan:
Test the Manager class scans the config directory.
The setup for the main tests above load the domain configs directly so that the test overrides can be included. This test just makes sure that the standard config directory scanning does pick up the relevant domain config files.
Bases: keystone.tests.core.TestCase, keystone.tests.test_backend.PolicyTests
Bases: sqlalchemy.ext.declarative.Base
Bases: keystone.tests.test_backend_sql.SqlTests, keystone.tests.test_backend.CatalogTests
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.test_backend_sql.SqlTests, keystone.tests.test_backend.FilterTests
Bases: keystone.tests.test_backend_sql.SqlTests, keystone.tests.test_backend.IdentityTests
This tests for backwards-compatibility with an essex/folsom bug.
Non-indexed attributes were returned in an ‘extra’ attribute, instead of on the entity itself; for consistency and backwards compatibility, those attributes should be included twice.
This behavior is specific to the SQL driver.
This tests for backwards-compatibility with an essex/folsom bug.
Non-indexed attributes were returned in an ‘extra’ attribute, instead of on the entity itself; for consistency and backwards compatibility, those attributes should be included twice.
This behavior is specific to the SQL driver.
Bases: keystone.tests.test_backend_sql.SqlTests, keystone.tests.test_backend.InheritanceTests
Bases: keystone.tests.test_backend_sql.SqlTests, keystone.tests.test_backend.LimitTests
Bases: keystone.tests.test_backend_sql.SqlTests, keystone.tests.test_backend.PolicyTests
Bases: keystone.tests.core.SQLDriverOverrides, keystone.tests.core.TestCase
Bases: keystone.tests.test_backend_sql.SqlTests, keystone.tests.test_backend.TokenTests
Bases: keystone.tests.test_backend_sql.SqlTests, keystone.tests.test_backend.TokenCacheInvalidation
Bases: keystone.tests.test_backend_sql.SqlTests, keystone.tests.test_backend.TrustTests
Bases: keystone.tests.core.TestCase, keystone.tests.test_backend.CatalogTests
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Bases: dogpile.cache.proxy.ProxyBackend
Proxy that forces a memory copy of stored values. The default in-memory cache-region does not perform a copy on values it is meant to cache. Therefore if the value is modified after set or after get, the cached value also is modified. This proxy does a copy as the last thing before storing data.
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Bases: object
Bases: object
Bases: object
Bases: testtools.testcase.TestCase
Bases: keystone.common.cache.backends.mongo.BaseTransform
Added here just to check manipulator logic is used correctly.
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Test using the deprecated AND new name for renamed options.
Bases: object
Helper method to assert No Roles
This needs to be overridden by child classes based on their content type.
Applicable to XML and JSON.
However, navigating extension links differs between content types. They need to be validated separately with assertValidExtensionLink.
Applicable to XML and JSON.
However, navigating links and media-types differs between content types so they need to be validated separately.
Bases: keystone.tests.test_content_types.RestfulTestCase, keystone.tests.test_content_types.CoreApiTests, keystone.tests.test_content_types.LegacyV2UsernameTests
Bases: object
Tests to show the broken username behavior in V2.
The V2 API is documented to use username instead of name. The API forced used to use name and left the username to fall into the extra field.
These tests ensure this behavior works so fixes to username/name will be backward compatible.
Creates a users and returns the response object.
| Parameters: | user_attrs – attributes added to the request body (optional) |
|---|
The response for creating a user will contain the extra fields.
The response for getting a user will contain the extra fields.
The response for updating a user will contain the extra fields.
This is specifically testing for updating a username when a value was not previously set.
The response for updating a user will contain the extra fields.
This tests updating a username that was previously set.
Username is set as the value of name if no username is provided.
This matches the v2.0 spec where we really should be using username and not name.
Username is set as the value of name if no username is provided.
This matches the v2.0 spec where we really should be using username and not name.
Username is set as the value of name if no username is provided.
This matches the v2.0 spec where we really should be using username and not name.
Bases: keystone.tests.test_content_types.RestfulTestCase, keystone.tests.test_content_types.CoreApiTests, keystone.tests.test_content_types.LegacyV2UsernameTests
Bases: keystone.tests.test_v3.RestfulTestCase
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.test_exception.ExceptionTestCase
Tests whether security-related info is exposed to the API user.
Bases: keystone.tests.test_exception.ExceptionTestCase
Tests if internal info is exposed to the API user on UnexpectedError.
Bases: keystone.exception.UnexpectedError
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.test_keystoneclient.ClientDrivenTestCase
Bases: keystone.tests.test_kvs.KVSBackendFixture
Bases: keystone.tests.core.TestCase
Bases: dogpile.cache.proxy.ProxyBackend
A test dogpile.cache proxy that does nothing.
Bases: dogpile.cache.proxy.ProxyBackend
A test dogpile.cache proxy that does nothing.
Bases: dogpile.cache.api.CacheBackend
A test dogpile.cache backend that conforms to the mixin-mechanism for overriding set and set_multi methods on dogpile memcached drivers.
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.BaseTestCase, testtools.tests.matchers.helpers.TestMatchersInterface
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.test_v3.RestfulTestCase
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Send a notification if the wrapped callable is successful.
Send a notification if the wrapped callable is successful.
Send a notification if the wrapped callable is successful.
Send a notification if the wrapped callable is successful.
Bases: object
PEM text and it’s associated data broken out, used for testing.
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase, keystone.tests.test_revoke.RevokeTests
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.test_backend_sql.SqlTests, keystone.tests.test_revoke.RevokeTests
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.test_sql_migrate_extensions.RevokeExtension
To run these tests against a live database:
Modify the file tests/backend_sql.conf to use the connection for your live database
Set up a blank, live database.
run the tests using
./run_tests.sh -N test_sql_upgrade
WARNING:
Your database will be wiped.
Do not do this against a Database with valuable data as all data will be lost.
Bases: keystone.tests.test_sql_upgrade.SqlMigrateBase
Test class for ensuring the Federation SQL.
To run these tests against a live database:
Modify the file keystone/tests/backend_sql.conf to use the connection for your live database
Set up a blank, live database
Run the tests using:
tox keystone.tests.test_sql_upgrade
WARNING:
Your database will be wiped.
Do not do this against a database with valuable data as all data will be
lost.
Bases: keystone.tests.core.SQLDriverOverrides, keystone.tests.core.TestCase
Asserts that the table contains the expected set of columns.
Bases: keystone.tests.test_sql_upgrade.SqlMigrateBase
Naively inserts key-value pairs into a table, given a dictionary.
Check columns when downgrade from migration 41.
The downgrade from migration 42 removes the enabled column from the endpoint table.
Downgrade from migration 42 migrates data.
Downgrade from migration 42 migrates data from enabled to extra. Any disabled endpoints have ‘enabled’: False put into ‘extra’.
Check columns when downgrade to migration 43.
The downgrade from migration 44 removes the enabled column from the service table.
Downgrade from migration 44 migrates data.
Downgrade from migration 44 migrates data from enabled to extra. Any disabled services have ‘enabled’: False put into ‘extra’.
You should be able to cleanly undo and re-apply all upgrades.
Upgrades are run in the following order:
0 -> 1 -> 0 -> 1 -> 2 -> 1 -> 2 -> 3 -> 2 -> 3 ...
^---------^ ^---------^ ^---------^
Migration 42 has to migrate data from extra to enabled.
Test upgrade to migration 43.
This migration should occur with no unique constraint on the region description column.
Create two regions with the same description.
Test upgrade to migration 43.
This test models a migration where there is a unique constraint on the description column.
Create two regions with the same description.
Bases: keystone.tests.test_sql_upgrade.SqlMigrateBase
When get the version before controlling, raises DbMigrationError.
Bases: keystone.tests.core.TestCase
Make sure both public and admin API work with 1-way ipv6 & SSL.
Bases: keystone.tests.core.TestCase
Test binding tokens to a Principal.
Even though everything in this file references kerberos the same concepts will apply to all future binding mechanisms.
Bases: keystone.tests.test_token_provider.TestPKIProvider, keystone.tests.core.TestCase
Bases: keystone.tests.test_token_provider.TestPKIProvider, keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Bases: object
Fakes a WSGI app URL normalized.
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Tests for the V2 Tenant controller.
These tests exercise keystone.assignment.controllers.Tenant.
Bases: keystone.tests.core.SQLDriverOverrides, keystone.tests.rest.RestfulTestCase
Translates XML responses to dicts.
This implies that we only have to write assertions for JSON.
Assert that two tokens are equal.
Compare two tokens except for their ids. This also truncates the time in the comparison.
Make assertions common to all API entities.
If a reference is provided, the entity will also be compared against the reference.
Make assertions common to all API list responses.
If a reference is provided, it’s ID will be searched for in the response, and asserted to be equal.
Make assertions common to all API responses.
Build auth dictionary.
It will create an auth dictionary based on all the arguments that it receives.
Bases: keystone.tests.test_v3.RestfulTestCase
Bases: keystone.tests.test_v3.RestfulTestCase
Bases: keystone.tests.test_v3.RestfulTestCase
Bases: keystone.tests.test_v3.RestfulTestCase
On authenticate, get a catalog that excludes disabled endpoints.
On authenticate, get a catalog that excludes disabled services.
Test correct roles are returned in scoped token.
Test Plan:
Bases: keystone.tests.test_v3_auth.TestAuthJSON
Bases: keystone.tests.test_v3.RestfulTestCase, keystone.tests.test_v3_auth.TokenAPITests
Bases: keystone.tests.test_v3_auth.TestTokenRevokeById
Test token revocation on the v3 Identity API.
Bases: keystone.tests.test_v3.RestfulTestCase
Test token revocation on the v3 Identity API.
Setup for Token Revoking Test Cases.
As well as the usual housekeeping, create a set of domains, users, groups, roles and projects for the subsequent tests:
Test deleting a group grant revokes tokens.
Test Plan:
Test deleting a role revokes token.
Test deleting a user grant revokes token.
Test Plan:
Test domain-group role assignment maintains existing token.
Test Plan:
Test user-domain role assignment maintains existing token.
Test Plan:
Test add/removal to/from group revokes token.
Test Plan:
Bases: keystone.tests.test_v3.RestfulTestCase
Test token revoke using v3 Identity API by token owner and admin.
Bases: keystone.tests.test_v3_auth.TestAuthInfo
Bases: keystone.tests.test_v3.RestfulTestCase, keystone.tests.test_v3_auth.TokenAPITests
Bases: keystone.tests.test_v3.RestfulTestCase
Test service & endpoint CRUD.
Call PUT /regions/{region_id} with conflicting region IDs.
Call PUT /regions/{region_id} with an ID in the request body.
Call PATCH /endpoints/{endpoint_id} with enabled: False.
Call PATCH /endpoints/{endpoint_id} with enabled: ‘False’.
Call PATCH /endpoints/{endpoint_id} with enabled: ‘kitties’.
Call PATCH /endpoints/{endpoint_id} with enabled: ‘True’.
Bases: keystone.tests.core.TestCase
Tests for the catalog Manager against the SQL backend.
Bases: keystone.tests.test_v3_credential.CredentialBaseTestCase
Test credential CRUD.
Bases: keystone.tests.test_v3_credential.CredentialBaseTestCase
Test v3 credential compatibility with ec2tokens.
Test signature validation with a v3 ec2 credential.
Bases: keystone.tests.test_v3.RestfulTestCase
Test credential with trust scoped token.
Bases: keystone.tests.test_v3_federation.FederationTests
A test class for Identity Providers.
Assign protocol to IdP that doesn’t exist.
Expect HTTP 404 code.
Create and later delete IdP.
Expect HTTP 404 for the GET IdP call.
Delete nonexisting IdP.
Expect HTTP 404 for the GET IdP call.
Delete protocol.
Expect HTTP 404 code for the GET call after the protocol is deleted.
Lists all available IdentityProviders.
This test collects ids of created IdPs and intersects it with the list of all available IdPs. List of all IdPs can be a superset of IdPs created in this test, because other tests also create IdPs.
Create set of protocols and later list them.
Compare input and output id sets.
Test whether Keystone let’s add two entities with identical names, however attached to different IdPs.
Expect HTTP 201 code
Test whether Keystone checks for unique idp/protocol values.
Add same protocol twice, expect Keystone to reject a latter call and return HTTP 409 code.
Bases: keystone.tests.test_v3_federation.FederationTests
Test parameters filtering based on the prefix.
With assertion_prefix set to fixed, non defailt value, issue an unscoped token from assertion EMPLOYEE_ASSERTION_PREFIXED. Expect server to return unscoped token.
Test parameters filtering based on the prefix.
With assertion_prefix default value set to empty string issue an unscoped token from assertion EMPLOYEE_ASSERTION. Next, configure assertion_prefix to value UserName. Try issuing unscoped token with EMPLOYEE_ASSERTION. Expect server to raise exception.Unathorized exception.
Test ‘standard’ workflow for granting access tokens.
Inject assertion that matches rule issuing bad group id.
Expect server to find out that some groups are missing in the backend and raise exception.MappedGroupNotFound exception.
Test whether non string objects are filtered out.
Put non string objects into the environment, inject correct assertion and try to get an unscoped token. Expect server not to fail on using split() method on non string objects and return token id in the HTTP header.
Issue unscoped token and serialize to XML.
Make sure common.serializer doesn’t complain about the response structure and tag names.
Issue multiple tokens scoping to different domains.
The new tokens should be scoped to:
Try to scope the unscoped token multiple times.
The new tokens should be scoped to:
Try to scope token from non-existent unscoped token.
Test full workflow with groups deletion before token scoping.
Bases: keystone.tests.test_v3.RestfulTestCase
Bases: keystone.tests.test_v3_federation.FederationTests
A class for testing CRUD operations for Mappings.
Bases: keystone.tests.test_v3_federation.FederationTests
A class for testing the mapping rule engine.
Should return user’s name and group id EMPLOYEE_GROUP_ID.
The ADMIN_ASSERTION should successfully have a match in MAPPING_LARGE. The will test the case where any_one_of is valid, and there is a direct mapping for the users name.
Should return group CONTRACTOR_GROUP_ID.
The CONTRACTOR_ASSERTION should successfully have a match in MAPPING_SMALL. This will test the case where many rules must be matched, including an any_one_of, and a direct mapping.
Check whether RuleProcessor discards non string objects.
Despite the fact that assertion is malformed and contains non string objects, RuleProcessor should correctly discard them and successfully have a match in MAPPING_LARGE.
Check whether RuleProcessor discards non string objects.
Expect RuleProcessor to discard non string object, which is required for a correct rule match. Since no rules are matched expect RuleProcessor to raise exception.Unauthorized exception.
Should deny authorization, the email of the tester won’t match.
This will not match since the email in the assertion will fail the regex test. It is set to match any @example.com address. But the incoming value is set to eviltester@example.org. RuleProcessor should raise exception.Unauthorized exception.
Should return user’s name and email.
The CUSTOMER_ASSERTION should successfully have a match in MAPPING_LARGE. This will test the case where a requirement has not_any_of, and direct mapping to a username, no group.
Bases: keystone.tests.filtering.FilterTests, keystone.tests.test_v3.RestfulTestCase
Test filter enforcement on the v3 Identity API.
Create sample data for these tests.
As well as the usual housekeeping, create a set of domains, users, roles and projects for the subsequent tests:
Remember that there will also be a fourth domain in existence, the default domain.
GET /users?name=<injected sql_statement>
Test Plan:
GET /domains?enabled=0
Test Plan:
GET /users?domain_id=mydomain (filtered)
Test Plan:
Bases: keystone.tests.test_v3_filters.IdentityTestFilteredCase
Bases: keystone.tests.test_v3_filters.IdentityTestFilteredCase
Test list limiting enforcement on the v3 Identity API.
Bases: keystone.tests.test_v3_filters.IdentityTestListLimitCase
Bases: keystone.tests.test_v3.RestfulTestCase
Test inheritance crud and its effects.
Bases: keystone.tests.test_v3.RestfulTestCase
Test inheritance crud and its effects.
Call GET /role_assignments?scope.OS-INHERIT:inherited_to.
Test Plan:
Call GET /role_assignments with inherited domain grants.
Test Plan:
Call GET /role_assignments with inherited domain grants.
Test Plan:
Call GET /role_assignments with inherited group domain grants.
Test Plan:
Bases: keystone.tests.test_v3.RestfulTestCase
Test domains, projects, users, groups, & role CRUD.
Call GET /role_assignments?effective=value.
Check the various ways of specifying the ‘effective’ query parameter. If the ‘effective’ query parameter is included then this should always be treated as as meaning ‘True’ unless it is specified as:
{url}?effective=0
This is by design to match the agreed way of handling policy checking on query/filter parameters.
Test Plan:
Call POST /domains` twice with upper() and lower() cased name.
Grant role on a domain to a group that doesn’t exist, 404 result.
When grant a role on a domain to a group that doesn’t exist, the server returns 404 Not Found for the group.
Grant role on a project to a group that doesn’t exist, 404 result.
When grant a role on a project to a group that doesn’t exist, the server returns 404 Not Found for the group.
Grant role on a domain to a user that doesn’t exist, 404 result.
When grant a role on a domain to a user that doesn’t exist, the server returns 404 Not Found for the user.
Grant role on a project to a user that doesn’t exist, 404 result.
When grant a role on a project to a user that doesn’t exist, the server returns 404 Not Found for the user.
Call DELETE /domains/{domain_id}.
The sample data set up already has a user, group, project and credential that is part of self.domain. Since the user we will authenticate with is in this domain, we create a another set of entities in a second domain. Deleting this second domain should delete all these new entities. In addition, all the entities in the regular self.domain should be unaffected by the delete.
Test Plan:
Call DELETE /projects/{project_id}
As well as making sure the delete succeeds, we ensure that any credentials that reference this projects are also deleted, while other credentials are unaffected.
Call DELETE /users/{user_id}.
As well as making sure the delete succeeds, we ensure that any credentials that reference this user are also deleted, while other credentials are unaffected. In addition, no tokens should remain valid for this user.
Call GET /role_assignments?filters.
Test Plan:
Call GET /role_assignments?effective.
Test Plan:
Call GET /role_assignments.
The sample data set up already has a user, group and project that is part of self.domain. We use these plus a new user we create as our data set, making sure we ignore any role assignments that are already in existence.
Since we don’t yet support a first class entity for role assignments, we are only testing the LIST API. To create and delete the role assignments we use the old grant APIs.
Test Plan:
Bases: keystone.tests.core.TestCase
Test V3 to V2 conversion methods.
Bases: keystone.tests.test_v3_oauth1.OAuthFlowTests
Bases: keystone.tests.test_v3_oauth1.OAuth1Tests
Bases: keystone.tests.test_v3.RestfulTestCase
Bases: keystone.tests.test_v3.RestfulTestCase
Bases: keystone.tests.test_v3.RestfulTestCase
Test policy CRUD.
Bases: keystone.tests.test_v3.RestfulTestCase
Test policy enforcement on the v3 Identity API.
Setup for Identity Protection Test Cases.
As well as the usual housekeeping, create a set of domains, users, roles and projects for the subsequent tests:
Remember that there will also be a fourth domain in existence, the default domain.
GET /users/{id} (match payload)
Test Plan:
GET /users/{id} (match target)
Test Plan:
GET /groups?domain_id=mydomain (protected)
Test Plan:
GET /groups?domain_id=mydomain&name=myname (protected)
Test Plan:
GET /users?domain_id=mydomain (filtered)
Test Plan:
GET /users?domain_id=mydomain (protected)
Test Plan:
GET /users (unprotected)
Test Plan:
DELETE /domains/{id}/users/{id}/roles/{id} (match target)
Test Plan:
Bases: keystone.tests.test_v3.RestfulTestCase
Test policy enforcement of the sample v3 cloud policy file.
Setup for v3 Cloud Policy Sample Test Cases.
The following data is created:
We test various api protection rules from the cloud sample policy file to make sure the sample is valid and that we correctly enforce it.
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Bases: keystone.tests.core.TestCase
Useful utilities for tests.