From c15a5a055561fbbe622cf3990f192f8e22ae54de Mon Sep 17 00:00:00 2001 From: zhangbailin Date: Tue, 15 Oct 2019 09:52:26 +0800 Subject: Add minor version [21] to the test_versions In v2.21, the os-instance-actions API returns information from deleted instances. This change does not involve changes to novaclient, but since novaclient does not add support for v2.21, it does not match API_MAX_VERSION when executing unit tests (novaclient.tests.unit.v2.test_shell.ShellTest.test_versions). Closes-Bug: #1848110 Change-Id: Ib1ad244bb059bb86a9f3025d4bc16c20946433d0 --- novaclient/tests/unit/v2/test_shell.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'novaclient') diff --git a/novaclient/tests/unit/v2/test_shell.py b/novaclient/tests/unit/v2/test_shell.py index 06b27ad3..65240a40 100644 --- a/novaclient/tests/unit/v2/test_shell.py +++ b/novaclient/tests/unit/v2/test_shell.py @@ -4313,6 +4313,7 @@ class ShellTest(utils.TestCase): # new microversion, just an additional checks. See # https://review.opendev.org/#/c/233076/ for more details) 20, # doesn't require any changes in novaclient + 21, # doesn't require any changes in novaclient 27, # NOTE(cdent): 27 adds support for updated microversion # headers, and is tested in test_api_versions, but is # not explicitly tested via wraps and _SUBSTITUTIONS. @@ -4365,9 +4366,11 @@ class ShellTest(utils.TestCase): versions_covered = set() for key, values in api_versions._SUBSTITUTIONS.items(): - for value in values: - if value.start_version.ver_major == 2: - versions_covered.add(value.start_version.ver_minor) + # Exclude version-wrapped + if 'novaclient.tests' not in key: + for value in values: + if value.start_version.ver_major == 2: + versions_covered.add(value.start_version.ver_minor) versions_not_covered = versions_supported - versions_covered unaccounted_for = versions_not_covered - exclusions -- cgit v1.2.1