From 8a89464d62e9c81a1ba15c0a3aa695456fc6fd33 Mon Sep 17 00:00:00 2001 From: Henry Nash Date: Wed, 16 Jan 2013 16:10:24 +0000 Subject: 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 --- tests/test_backend_pam.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/test_backend_pam.py') diff --git a/tests/test_backend_pam.py b/tests/test_backend_pam.py index a5384d43..a8f4e575 100644 --- a/tests/test_backend_pam.py +++ b/tests/test_backend_pam.py @@ -22,6 +22,7 @@ from keystone import test CONF = config.CONF +DEFAULT_DOMAIN_ID = CONF.identity.default_domain_id class PamIdentity(test.TestCase): @@ -41,7 +42,8 @@ class PamIdentity(test.TestCase): def test_get_project_by_name(self): tenant_in_name = self.tenant_in['name'] - tenant_out = self.identity_api.get_project_by_name(tenant_in_name) + tenant_out = self.identity_api.get_project_by_name( + tenant_in_name, DEFAULT_DOMAIN_ID) self.assertDictEqual(self.tenant_in, tenant_out) def test_get_user(self): @@ -49,7 +51,8 @@ class PamIdentity(test.TestCase): self.assertDictEqual(self.user_in, user_out) def test_get_user_by_name(self): - user_out = self.identity_api.get_user_by_name(self.user_in['name']) + user_out = self.identity_api.get_user_by_name( + self.user_in['name'], DEFAULT_DOMAIN_ID) self.assertDictEqual(self.user_in, user_out) def test_get_metadata_for_non_root(self): -- cgit