"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/tests/unit/test_cli.py" between
keystone-16.0.0.tar.gz and keystone-16.0.1.tar.gz

About: OpenStack Keystone (Core Service: Identity) provides an authentication and authorization service for other OpenStack services. Provides a catalog of endpoints for all OpenStack services.
The "Train" series (latest release).

test_cli.py  (keystone-16.0.0):test_cli.py  (keystone-16.0.1)
skipping to change at line 311 skipping to change at line 311
'--immutable-roles'], '--immutable-roles'],
project='keystone') project='keystone')
self._do_test_bootstrap(self.bootstrap) self._do_test_bootstrap(self.bootstrap)
admin_role = PROVIDERS.role_api.get_role(self.bootstrap.role_id) admin_role = PROVIDERS.role_api.get_role(self.bootstrap.role_id)
reader_role = PROVIDERS.role_api.get_role(self.bootstrap.reader_role_id) reader_role = PROVIDERS.role_api.get_role(self.bootstrap.reader_role_id)
member_role = PROVIDERS.role_api.get_role(self.bootstrap.member_role_id) member_role = PROVIDERS.role_api.get_role(self.bootstrap.member_role_id)
self.assertTrue(admin_role['options']['immutable']) self.assertTrue(admin_role['options']['immutable'])
self.assertTrue(member_role['options']['immutable']) self.assertTrue(member_role['options']['immutable'])
self.assertTrue(reader_role['options']['immutable']) self.assertTrue(reader_role['options']['immutable'])
def test_bootstrap_with_ambiguous_role_names(self):
# bootstrap system to create the default admin role
self._do_test_bootstrap(self.bootstrap)
# create a domain-specific roles that share the same names as the
# default roles created by keystone-manage bootstrap
domain = {'id': uuid.uuid4().hex, 'name': uuid.uuid4().hex}
domain = PROVIDERS.resource_api.create_domain(domain['id'], domain)
domain_roles = {}
for name in ['admin', 'member', 'reader']:
domain_role = {
'domain_id': domain['id'],
'id': uuid.uuid4().hex,
'name': name
}
domain_roles[name] = PROVIDERS.role_api.create_role(
domain_role['id'], domain_role
)
# ensure subsequent bootstrap attempts don't fail because of
# ambiguity
self._do_test_bootstrap(self.bootstrap)
class CliBootStrapTestCaseWithEnvironment(CliBootStrapTestCase): class CliBootStrapTestCaseWithEnvironment(CliBootStrapTestCase):
def config(self, config_files): def config(self, config_files):
CONF(args=['bootstrap'], project='keystone', CONF(args=['bootstrap'], project='keystone',
default_config_files=config_files) default_config_files=config_files)
def setUp(self): def setUp(self):
super(CliBootStrapTestCaseWithEnvironment, self).setUp() super(CliBootStrapTestCaseWithEnvironment, self).setUp()
self.password = uuid.uuid4().hex self.password = uuid.uuid4().hex
self.username = uuid.uuid4().hex self.username = uuid.uuid4().hex
 End of changes. 1 change blocks. 
0 lines changed or deleted 24 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)