def setUp(self): self.useFixture(database.Database()) super(TestCaseWithBootstrap, self).setUp() self.config_fixture = self.useFixture(config_fixture.Config(CONF)) CONF(args=[], project='keystone') self.useFixture( ksfixtures.KeyRepository(self.config_fixture, 'fernet_tokens', CONF.fernet_tokens.max_active_keys)) self.useFixture( ksfixtures.KeyRepository(self.config_fixture, 'fernet_receipts', CONF.fernet_receipts.max_active_keys)) self.bootstrapper = bootstrap.Bootstrapper() self.addCleanup(provider_api.ProviderAPIs._clear_registry_instances) self.addCleanup(self.clean_default_domain) self.bootstrapper.admin_password = '******' self.bootstrapper.admin_username = '******' self.bootstrapper.project_name = 'admin' self.bootstrapper.admin_role_name = 'admin' self.bootstrapper.service_name = 'keystone' self.bootstrapper.public_url = 'http://localhost/identity/' self.bootstrapper.immutable_roles = True try: PROVIDERS.resource_api.create_domain( default_fixtures.ROOT_DOMAIN['id'], default_fixtures.ROOT_DOMAIN) except exception.Conflict: pass self.bootstrapper.bootstrap()
def setUp(self): self.useFixture(database.Database()) super(TestCaseWithBootstrap, self).setUp() self.config_fixture = self.useFixture(config_fixture.Config(CONF)) self.useFixture( ksfixtures.KeyRepository(self.config_fixture, 'fernet_tokens', CONF.fernet_tokens.max_active_keys)) self.bootstrapper = bootstrap.Bootstrapper() self.addCleanup(provider_api.ProviderAPIs._clear_registry_instances) self.addCleanup(self.clean_default_domain) self.bootstrapper.admin_password = '******' self.bootstrapper.admin_username = '******' self.bootstrapper.project_name = 'admin' self.bootstrapper.admin_role_name = 'admin' self.bootstrapper.service_name = 'keystone' self.bootstrapper.public_url = 'http://localhost/identity/' self.bootstrapper.bootstrap()
def __init__(self): self.bootstrapper = bootstrap.Bootstrapper()