diff --git a/senlin_tempest_plugin/config.py b/senlin_tempest_plugin/config.py index 3c55ce9..740e368 100644 --- a/senlin_tempest_plugin/config.py +++ b/senlin_tempest_plugin/config.py @@ -27,5 +27,21 @@ ClusteringGroup = [ help="Catalog type of the clustering service."), cfg.IntOpt("wait_timeout", default=180, - help="Waiting time for a specific status, in seconds.") + help="Waiting time for a specific status, in seconds."), + cfg.StrOpt('min_microversion', + default=None, + help="Lower version of the test target microversion range. " + "The format is 'X.Y', where 'X' and 'Y' are int values. " + "Tempest selects tests based on the range between " + "min_microversion and max_microversion. If both values " + "are None, Tempest avoids tests which require a " + "microversion."), + cfg.StrOpt('max_microversion', + default='latest', + help="Upper version of the test target microversion range. " + "The format is 'X.Y'. where 'X' and 'Y' are int values. " + "Tempest selects tests based on the range between " + "microversion and max_microversion. If both values " + "are None, Tempest avoids tests which require a " + "microversion.") ] diff --git a/senlin_tempest_plugin/tests/api/clusters/test_cluster_scale_out.py b/senlin_tempest_plugin/tests/api/clusters/test_cluster_scale_out.py index 108553c..d58bbfc 100644 --- a/senlin_tempest_plugin/tests/api/clusters/test_cluster_scale_out.py +++ b/senlin_tempest_plugin/tests/api/clusters/test_cluster_scale_out.py @@ -10,6 +10,8 @@ # License for the specific language governing permissions and limitations # under the License. +from tempest import config +from tempest.lib.common import api_version_utils from tempest.lib import decorators from tempest.lib import exceptions import time @@ -18,6 +20,9 @@ from senlin_tempest_plugin.common import utils from senlin_tempest_plugin.tests.api import base +CONF = config.CONF + + class TestClusterActionScaleOut(base.BaseSenlinAPITest): def setUp(self): @@ -120,6 +125,17 @@ class TestClusterScaleOutNegativeNotFound(base.BaseSenlinAPITest): class TestClusterScaleOutNegativeResourceIsLocked(base.BaseSenlinAPITest): + min_microversion = '1.11' + max_microversion = 'latest' + + @classmethod + def skip_checks(cls): + super(base.BaseSenlinAPITest, cls).skip_checks() + api_version_utils.check_skip_with_microversion( + cls.min_microversion, cls.max_microversion, + CONF.clustering.min_microversion, + CONF.clustering.max_microversion) + def setUp(self): super(TestClusterScaleOutNegativeResourceIsLocked, self).setUp() # create profile with simulated wait time to test