From a0a4796d006e7067c52e96f194e075da54b2570f Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Fri, 9 Feb 2018 09:51:33 +0100 Subject: [PATCH] Remove test_contains_current_release_entry This test is not helpful for development at all - it only fails after the version is issued, when it's too late to fix. Furthermore, it blocks using the sem-ver tag in a commit message to bump minor or major pre-version, as it expects the future release to exist. Change-Id: I48034d1433b7e67f1ce2853227dd5a539e15a360 --- doc/source/contributor/releasing.rst | 5 ++--- ironic/tests/unit/common/test_release_mappings.py | 8 -------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/doc/source/contributor/releasing.rst b/doc/source/contributor/releasing.rst index db6674f2db..e9be83a9b8 100644 --- a/doc/source/contributor/releasing.rst +++ b/doc/source/contributor/releasing.rst @@ -57,9 +57,8 @@ Things to do before releasing It is important to do this before a stable/ branch is made (or if `the grenade switch is made `_ to use the latest release from stable as the 'old' release). - Otherwise, once it is made, CI (a `unit test - `_ - and grenade that tests new-release -> master) will fail. + Otherwise, once it is made, CI (the grenade job that tests new-release -> + master) will fail. Things to do after releasing ============================ diff --git a/ironic/tests/unit/common/test_release_mappings.py b/ironic/tests/unit/common/test_release_mappings.py index 4c90562d97..ef35491950 100644 --- a/ironic/tests/unit/common/test_release_mappings.py +++ b/ironic/tests/unit/common/test_release_mappings.py @@ -22,7 +22,6 @@ from ironic.conductor import rpcapi from ironic.db.sqlalchemy import models from ironic.objects import base as obj_base from ironic.tests import base -from ironic import version def _check_versions_compatibility(conf_version, actual_version): @@ -70,13 +69,6 @@ class ReleaseMappingsTestCase(base.TestCase): objects = set(mapping['objects']) self.assertTrue(objects.issubset(registered_objects)) - def test_contains_current_release_entry(self): - version_info = str(version.version_info) - # NOTE(sborkows): We only need first two values from version (like 5.1) - # and assume version_info is of the form 'x.y.z'. - current_release = version_info[:version_info.rfind('.')] - self.assertIn(current_release, release_mappings.RELEASE_MAPPING) - def test_current_rpc_version(self): self.assertEqual(rpcapi.ConductorAPI.RPC_API_VERSION, release_mappings.RELEASE_MAPPING['master']['rpc'])