Check required microversion
- Add min and max microversion to configuration - Set min microversion for TestClusterScaleOutNegativeResourceIsLocked - Skip TestClusterScaleOutNegativeResourceIsLocked if min microversion is not met. Change-Id: I29a1ccec608a0f8d78d913f7841e3bf5e24b3c5c
This commit is contained in:
parent
fc3b473eaa
commit
ad26554ca3
@ -27,5 +27,21 @@ ClusteringGroup = [
|
|||||||
help="Catalog type of the clustering service."),
|
help="Catalog type of the clustering service."),
|
||||||
cfg.IntOpt("wait_timeout",
|
cfg.IntOpt("wait_timeout",
|
||||||
default=180,
|
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.")
|
||||||
]
|
]
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
from tempest import config
|
||||||
|
from tempest.lib.common import api_version_utils
|
||||||
from tempest.lib import decorators
|
from tempest.lib import decorators
|
||||||
from tempest.lib import exceptions
|
from tempest.lib import exceptions
|
||||||
import time
|
import time
|
||||||
@ -18,6 +20,9 @@ from senlin_tempest_plugin.common import utils
|
|||||||
from senlin_tempest_plugin.tests.api import base
|
from senlin_tempest_plugin.tests.api import base
|
||||||
|
|
||||||
|
|
||||||
|
CONF = config.CONF
|
||||||
|
|
||||||
|
|
||||||
class TestClusterActionScaleOut(base.BaseSenlinAPITest):
|
class TestClusterActionScaleOut(base.BaseSenlinAPITest):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
@ -120,6 +125,17 @@ class TestClusterScaleOutNegativeNotFound(base.BaseSenlinAPITest):
|
|||||||
|
|
||||||
class TestClusterScaleOutNegativeResourceIsLocked(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):
|
def setUp(self):
|
||||||
super(TestClusterScaleOutNegativeResourceIsLocked, self).setUp()
|
super(TestClusterScaleOutNegativeResourceIsLocked, self).setUp()
|
||||||
# create profile with simulated wait time to test
|
# create profile with simulated wait time to test
|
||||||
|
Loading…
Reference in New Issue
Block a user