Add microversion fixture to set microversion
Currently microversion is being set via set method on service clients
and stored as instance variable.
That approach is little bit complicated and provides less
flexibility on microversion control from test side.
This commit add fixture to set and reset the microversion
and during that fixture scope set microversion will be used to send API request.
Partially implements blueprint api-microversions-testing-support
Change-Id: If2bc46e36dd44dce4c4bbb53bf9024c003f78b93
diff --git a/tempest/common/api_version_utils.py b/tempest/common/api_version_utils.py
index c3d977f..7c7e96a 100644
--- a/tempest/common/api_version_utils.py
+++ b/tempest/common/api_version_utils.py
@@ -18,6 +18,9 @@
from tempest import exceptions
+LATEST_MICROVERSION = 'latest'
+
+
class BaseMicroversionTest(object):
"""Mixin class for API microversion test class."""
@@ -27,7 +30,7 @@
# for all microversions. We need to define microversion range
# (min_microversion, max_microversion) on each test class if necessary.
min_microversion = None
- max_microversion = 'latest'
+ max_microversion = LATEST_MICROVERSION
def check_skip_with_microversion(test_min_version, test_max_version,