summaryrefslogtreecommitdiffstats
path: root/tests/test_keystoneclient.py
diff options
context:
space:
mode:
authorHenry Nash <henryn@linux.vnet.ibm.com>2013-01-16 16:10:24 +0000
committerHenry Nash <henryn@linux.vnet.ibm.com>2013-02-12 16:09:15 +0000
commit8a89464d62e9c81a1ba15c0a3aa695456fc6fd33 (patch)
tree46c61fe10c2859fdeddd80379d15bc839d37cd3d /tests/test_keystoneclient.py
parentf1defe8f624e006a7562bc07cd471bdd176e303e (diff)
downloadkeystone-8a89464d62e9c81a1ba15c0a3aa695456fc6fd33.tar.gz
keystone-8a89464d62e9c81a1ba15c0a3aa695456fc6fd33.tar.xz
keystone-8a89464d62e9c81a1ba15c0a3aa695456fc6fd33.zip
Keystone backend preparation for domain-scoping
These changes lay the ground work for the implmentation of domain-scoping, but are benign in that they don't change the token. They include making domain_id a first-class attribute in the user and project entity (i.e. move it out of the 'extra' attribute), filling in domain grant and project support for the kvs backend and fixing a series of issues in the mirgation to make it work for both MySQL, Postgresql and sqlite. A further, separate, commit will actually provide the code to update the actual tokens once the v3 token support has been added. blueprint domain-scoping blueprint default-domain Change-Id: I55ab7947a6a1efbab003bd234856bd3805bb4a63
Diffstat (limited to 'tests/test_keystoneclient.py')
-rw-r--r--tests/test_keystoneclient.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/test_keystoneclient.py b/tests/test_keystoneclient.py
index 213e3ddc..09b7a2f7 100644
--- a/tests/test_keystoneclient.py
+++ b/tests/test_keystoneclient.py
@@ -22,11 +22,13 @@ import nose.exc
from keystone.openstack.common import jsonutils
from keystone.openstack.common import timeutils
+from keystone import config
from keystone import test
-
import default_fixtures
+CONF = config.CONF
+DEFAULT_DOMAIN_ID = CONF.identity.default_domain_id
OPENSTACK_REPO = 'https://review.openstack.org/p/openstack'
KEYSTONECLIENT_REPO = '%s/python-keystoneclient.git' % OPENSTACK_REPO
@@ -862,7 +864,8 @@ class KcMasterTestCase(CompatTestCase, KeystoneClientTests):
# Add two arbitrary tenants to user for testing purposes
for i in range(2):
tenant_id = uuid.uuid4().hex
- tenant = {'name': 'tenant-%s' % tenant_id, 'id': tenant_id}
+ tenant = {'name': 'tenant-%s' % tenant_id, 'id': tenant_id,
+ 'domain_id': DEFAULT_DOMAIN_ID}
self.identity_api.create_project(tenant_id, tenant)
self.identity_api.add_user_to_project(tenant_id,
self.user_foo['id'])
@@ -888,7 +891,8 @@ class KcMasterTestCase(CompatTestCase, KeystoneClientTests):
# Add two arbitrary tenants to user for testing purposes
for i in range(2):
tenant_id = uuid.uuid4().hex
- tenant = {'name': 'tenant-%s' % tenant_id, 'id': tenant_id}
+ tenant = {'name': 'tenant-%s' % tenant_id, 'id': tenant_id,
+ 'domain_id': DEFAULT_DOMAIN_ID}
self.identity_api.create_project(tenant_id, tenant)
self.identity_api.add_user_to_project(tenant_id,
self.user_foo['id'])