Merge "Remove FT "test_has_offline_migrations_*" tests"

This commit is contained in:
Zuul 2021-04-06 21:08:25 +00:00 committed by Gerrit Code Review
commit 4510157cd0
1 changed files with 0 additions and 26 deletions

View File

@ -324,25 +324,9 @@ class _TestModelsMigrations(test_migrations.ModelsMigrationsSync):
self.alembic_config, 'upgrade', self.alembic_config, 'upgrade',
'%s@head' % migration.CONTRACT_BRANCH) '%s@head' % migration.CONTRACT_BRANCH)
def _test_has_offline_migrations(self, revision, expected):
engine = self.get_engine()
cfg.CONF.set_override('connection', engine.url, group='database')
migration.do_alembic_command(self.alembic_config, 'upgrade', revision)
self.assertEqual(expected,
migration.has_offline_migrations(self.alembic_config,
'unused'))
def test_has_offline_migrations_pending_contract_scripts(self):
self._test_has_offline_migrations('kilo', True)
def test_has_offline_migrations_all_heads_upgraded(self):
self._test_has_offline_migrations('heads', False)
# NOTE(ihrachys): if this test fails for you, it probably means that you # NOTE(ihrachys): if this test fails for you, it probably means that you
# attempt to add an unsafe contract migration script, that is in # attempt to add an unsafe contract migration script, that is in
# contradiction to blueprint online-upgrades # contradiction to blueprint online-upgrades
# TODO(ihrachys): revisit later in Pike+ where some contract scripts may be
# safe again
def test_forbid_offline_migrations_starting_newton(self): def test_forbid_offline_migrations_starting_newton(self):
engine = self.get_engine() engine = self.get_engine()
cfg.CONF.set_override('connection', engine.url, group='database') cfg.CONF.set_override('connection', engine.url, group='database')
@ -396,16 +380,6 @@ class TestModelsMigrationsMysql(testlib_api.MySQLTestCaseMixin,
def test_branches(self): def test_branches(self):
super(TestModelsMigrationsMysql, self).test_branches() super(TestModelsMigrationsMysql, self).test_branches()
@test_base.skip_if_timeout("bug 1687027")
def test_has_offline_migrations_pending_contract_scripts(self):
super(TestModelsMigrationsMysql,
self).test_has_offline_migrations_pending_contract_scripts()
@test_base.skip_if_timeout("bug 1687027")
def test_has_offline_migrations_all_heads_upgraded(self):
super(TestModelsMigrationsMysql,
self).test_has_offline_migrations_all_heads_upgraded()
@test_base.skip_if_timeout("bug 1687027") @test_base.skip_if_timeout("bug 1687027")
def test_models_sync(self): def test_models_sync(self):
super(TestModelsMigrationsMysql, self).test_models_sync() super(TestModelsMigrationsMysql, self).test_models_sync()