def setUp(self): super(SqlUpgradeTests, self).setUp() self.config([test.etcdir('keystone.conf.sample'), test.testsdir('test_overrides.conf'), test.testsdir('backend_sql.conf')]) # create and share a single sqlalchemy engine for testing self.engine = sql.Base().get_engine() self.metadata = sqlalchemy.MetaData() # populate the engine with tables & fixtures self.metadata.bind = self.engine self.repo_path = migration._find_migrate_repo() self.schema = versioning_api.ControlledSchema.create(self.engine, self.repo_path, 0)
def setUp(self): super(SqlUpgradeTests, self).setUp() self.config([ test.etcdir('keystone.conf.sample'), test.testsdir('test_overrides.conf'), test.testsdir('backend_sql.conf') ]) # create and share a single sqlalchemy engine for testing self.engine = sql.Base().get_engine(allow_global_engine=False) self.metadata = sqlalchemy.MetaData() # populate the engine with tables & fixtures self.metadata.bind = self.engine self.repo_path = migration._find_migrate_repo() self.schema = versioning_api.ControlledSchema.create( self.engine, self.repo_path, 0)
def setUp(self): super(SqlUpgradeTests, self).setUp() self.config(self.config_files()) self.base = sql.Base() # create and share a single sqlalchemy engine for testing self.engine = self.base.get_engine(allow_global_engine=False) self.Session = self.base.get_sessionmaker(engine=self.engine, autocommit=False) self.initialize_sql() self.repo_path = migration._find_migrate_repo() self.schema = versioning_api.ControlledSchema.create( self.engine, self.repo_path, 0) # auto-detect the highest available schema version in the migrate_repo self.max_version = self.schema.repository.version().version
def setUp(self): super(SqlUpgradeTests, self).setUp() self.config([test.etcdir('keystone.conf.sample'), test.testsdir('test_overrides.conf'), test.testsdir('backend_sql.conf')]) # create and share a single sqlalchemy engine for testing base = sql.Base() self.engine = base.get_engine(allow_global_engine=False) self.Session = base.get_sessionmaker( engine=self.engine, autocommit=False) self.metadata = sqlalchemy.MetaData() # populate the engine with tables & fixtures self.metadata.bind = self.engine self.repo_path = migration._find_migrate_repo() self.schema = versioning_api.ControlledSchema.create(self.engine, self.repo_path, 0) # auto-detect the highest available schema version in the migrate_repo self.max_version = self.schema.repository.version().version