diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-07-21 09:42:16 +0200 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-07-21 09:50:13 +0200 |
commit | b41b257fca32e09217acdec09113ae37bccbfa78 (patch) | |
tree | 66e4968fa1ccd53c5c31e520a632651414b00ce9 | |
parent | 9aa520f619c2c0fac116cadb2c65900751b4949b (diff) |
Skip Snaps testcases when OpenStack Rocky
Snaps is testing vs OpenStack Queens following the traditional
release track. Then Snaps testcases must be skipped vs OpenStack
master as deployed by Apex.
Snaps isn't compatible yet with the last Cinder changes (API
microversions) which is out of its current scope [1].
[1] http://artifacts.opnfv.org/logs/functest/lf-pod1/2018-07-19_05-29-02/functest.log
Change-Id: I1e93527d9c87eb11bf7fd0cc9d04597614d32370
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r-- | functest/opnfv_tests/openstack/snaps/snaps_test_runner.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py index 70327ff89..6d784d35e 100644 --- a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py +++ b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py @@ -12,10 +12,13 @@ import logging +import os_client_config +import shade from xtesting.core import unit from functest.opnfv_tests.openstack.snaps import snaps_utils from functest.utils import config +from functest.utils import functest_utils class SnapsTestRunner(unit.Suite): @@ -51,3 +54,13 @@ class SnapsTestRunner(unit.Suite): self.image_metadata = None if hasattr(config.CONF, 'snaps_images'): self.image_metadata = getattr(config.CONF, 'snaps_images') + + def check_requirements(self): + """Skip if OpenStack Rocky or newer.""" + try: + cloud_config = os_client_config.get_config() + cloud = shade.OpenStackCloud(cloud_config=cloud_config) + if functest_utils.get_nova_version(cloud) > (2, 60): + self.is_skipped = True + except Exception: # pylint: disable=broad-except + pass |