summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhangbailin <zhangbailin@inspur.com>2019-10-15 09:52:26 +0800
committerzhangbailin <zhangbailin@inspur.com>2019-10-22 07:52:43 +0800
commitc15a5a055561fbbe622cf3990f192f8e22ae54de (patch)
treec67822fc6324ed67673e2ff651c5834a3d76b2c3
parent6c0e4d7a3940ba6d4d11d0c89933cc00b898ed9e (diff)
downloadpython-novaclient-c15a5a055561fbbe622cf3990f192f8e22ae54de.tar.gz
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
-rw-r--r--novaclient/tests/unit/v2/test_shell.py9
1 files changed, 6 insertions, 3 deletions
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