diff options
Diffstat (limited to 'functest/opnfv_tests/openstack')
5 files changed, 38 insertions, 16 deletions
diff --git a/functest/opnfv_tests/openstack/rally/blacklist.txt b/functest/opnfv_tests/openstack/rally/blacklist.txt index 099d6864..0623368d 100644 --- a/functest/opnfv_tests/openstack/rally/blacklist.txt +++ b/functest/opnfv_tests/openstack/rally/blacklist.txt @@ -38,6 +38,16 @@ scenario: # Bug: https://bugs.launchpad.net/ubuntu/+bug/1704138 # Fix: https://review.openstack.org/#/c/483402/ - CeilometerEvents.create_user_and_list_event_types + - + scenarios: + - '^os-' # all scenarios + installers: + - '.+' # all installers + tests: + # Starting from ocata, following tests require the presence of + # panko in the deployment. This is not currently fulfilled + # Ref: https://docs.openstack.org/releasenotes/ceilometer/ocata.html + - 'CeilometerEvents..*' functionality: - diff --git a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py index 4f71b5f5..17e02466 100644 --- a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py +++ b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py @@ -100,6 +100,14 @@ class RefstackClient(testcase.TestCase): try: with open(os.path.join(conf_utils.REFSTACK_RESULTS_DIR, "refstack.log"), 'r') as logfile: + for line in logfile.readlines(): + if 'Tests' in line: + break + if re.search(r"\} tempest\.", line): + LOGGER.info(line.replace('\n', '')) + + with open(os.path.join(conf_utils.REFSTACK_RESULTS_DIR, + "refstack.log"), 'r') as logfile: output = logfile.read() for match in re.findall(r"Ran: (\d+) tests in (\d+\.\d{4}) sec.", @@ -216,11 +224,14 @@ class RefstackClient(testcase.TestCase): if not self.tempestconf: self.generate_conf() - os_utils.init_tempest_cleanup( - self.tempestconf.DEPLOYMENT_DIR, 'tempest.conf', - os.path.join(conf_utils.REFSTACK_RESULTS_DIR, - "tempest-cleanup-init.log") - ) + try: + os_utils.init_tempest_cleanup( + self.tempestconf.DEPLOYMENT_DIR, 'tempest.conf', + os.path.join(conf_utils.REFSTACK_RESULTS_DIR, + "tempest-cleanup-init.log")) + except Exception as err: + LOGGER.error(str(err)) + return testcase.TestCase.EX_RUN_ERROR return super(RefstackClient, self).create_snapshot() diff --git a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py index 19c6a87f..bfdcd862 100644 --- a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py +++ b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py @@ -10,7 +10,6 @@ import logging from functest.core import unit from functest.opnfv_tests.openstack.snaps import snaps_utils -from functest.utils import functest_utils from functest.utils.constants import CONST from snaps.openstack import create_flavor @@ -44,7 +43,7 @@ class SnapsTestRunner(unit.Suite): self.use_fip = CONST.__getattribute__('snaps_use_floating_ips') self.use_keystone = CONST.__getattribute__('snaps_use_keystone') - scenario = functest_utils.get_scenario() + scenario = CONST.__getattribute__('DEPLOY_SCENARIO') self.flavor_metadata = None if 'ovs' in scenario or 'fdio' in scenario: diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py index c7ad4df2..b8a4e9ad 100644 --- a/functest/opnfv_tests/openstack/tempest/tempest.py +++ b/functest/opnfv_tests/openstack/tempest/tempest.py @@ -267,11 +267,14 @@ class TempestCommon(testcase.TestCase): # Make sure that the verifier is configured conf_utils.configure_verifier(self.DEPLOYMENT_DIR) - os_utils.init_tempest_cleanup( - self.DEPLOYMENT_DIR, 'tempest.conf', - os.path.join(conf_utils.TEMPEST_RESULTS_DIR, - "tempest-cleanup-init.log") - ) + try: + os_utils.init_tempest_cleanup( + self.DEPLOYMENT_DIR, 'tempest.conf', + os.path.join(conf_utils.TEMPEST_RESULTS_DIR, + "tempest-cleanup-init.log")) + except Exception as err: + logger.error(str(err)) + return testcase.TestCase.EX_RUN_ERROR return super(TempestCommon, self).create_snapshot() @@ -442,7 +445,7 @@ class TempestResourcesManager(object): if (CONST.__getattribute__('tempest_use_custom_flavors') or use_custom_flavors): logger.info("Creating flavor for Tempest suite") - scenario = ft_utils.get_scenario() + scenario = CONST.__getattribute__('DEPLOY_SCENARIO') flavor_metadata = None if 'ovs' in scenario or 'fdio' in scenario: flavor_metadata = create_flavor.MEM_PAGE_SIZE_LARGE @@ -461,7 +464,7 @@ class TempestResourcesManager(object): if use_custom_flavors: logger.info("Creating 2nd flavor for Tempest suite") - scenario = ft_utils.get_scenario() + scenario = CONST.__getattribute__('DEPLOY_SCENARIO') flavor_metadata_alt = None if 'ovs' in scenario or 'fdio' in scenario: flavor_metadata_alt = create_flavor.MEM_PAGE_SIZE_LARGE diff --git a/functest/opnfv_tests/openstack/vping/vping_base.py b/functest/opnfv_tests/openstack/vping/vping_base.py index 6e908065..c93d2f26 100644 --- a/functest/opnfv_tests/openstack/vping/vping_base.py +++ b/functest/opnfv_tests/openstack/vping/vping_base.py @@ -13,7 +13,6 @@ import time import uuid from functest.core import testcase -from functest.utils import functest_utils from functest.utils.constants import CONST from snaps.openstack import create_flavor @@ -139,7 +138,7 @@ class VPingBase(testcase.TestCase): self.logger.info( "Creating flavor with name: '%s'" % self.flavor_name) - scenario = functest_utils.get_scenario() + scenario = CONST.__getattribute__('DEPLOY_SCENARIO') flavor_metadata = None if 'ovs' in scenario or 'fdio' in scenario: flavor_metadata = create_flavor.MEM_PAGE_SIZE_LARGE |