From ff5a024c7b01f504976052f96d15187bdd87c351 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Tue, 6 Apr 2021 08:14:51 +0000 Subject: [PATCH] Remove FT "test_has_offline_migrations_*" tests "test_has_offline_migrations_pending_contract_scripts" is testing a non supported branch, "Kilo". The usefulness expired when this branch was declared EOL. "test_has_offline_migrations_all_heads_upgraded" is tested in "test_forbid_offline_migrations_starting_newton". Since "Newton", no more DB contract migrations are allowed. Both tests are checking the same behavior. Due to the time extension and the lack of value of those tests, this patch removes both. test_forbid_offline_migrations_starting_newton [683.133807s] test_has_offline_migrations_pending_contract_scripts [123.091853s] Change-Id: I4846ecdd8312fa2ff915c4461da07a607c7a8f8c Related-Bug: #1687027 (cherry picked from commit 8522628f2f6f59344c04568b31c444f7a290562d) --- .../tests/functional/db/test_migrations.py | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/neutron/tests/functional/db/test_migrations.py b/neutron/tests/functional/db/test_migrations.py index 0ee673e8f2c..b1e0aac3b20 100644 --- a/neutron/tests/functional/db/test_migrations.py +++ b/neutron/tests/functional/db/test_migrations.py @@ -324,25 +324,9 @@ class _TestModelsMigrations(test_migrations.ModelsMigrationsSync): self.alembic_config, 'upgrade', '%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 # attempt to add an unsafe contract migration script, that is in # 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): engine = self.get_engine() cfg.CONF.set_override('connection', engine.url, group='database') @@ -396,16 +380,6 @@ class TestModelsMigrationsMysql(testlib_api.MySQLTestCaseMixin, def test_branches(self): 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") def test_models_sync(self): super(TestModelsMigrationsMysql, self).test_models_sync()