Test API max version is in RELEASE_MAPPINGS

This should catch the case where the API version has been updated but
release mappings has not (or vice versa).

Change-Id: I62183d329c0efe9fe3bd47a0ca478155075b3230
This commit is contained in:
Mark Goddard
2019-03-01 14:02:58 +00:00
parent 84f6e5fb84
commit c121709575

View File

@@ -80,6 +80,11 @@ class TestMaxVersionString(base.TestCase):
self.assertEqual(versions._MAX_VERSION_STRING,
versions.max_version_string())
def test_max_version_not_pinned_in_release_mappings(self):
CONF.set_override('pin_release_version', None)
self.assertEqual(release_mappings.RELEASE_MAPPING['master']['api'],
versions.max_version_string())
@mock.patch('ironic.common.release_mappings.RELEASE_MAPPING',
autospec=True)
def test_max_version_pinned(self, mock_release_mapping):