diff options
-rw-r--r-- | docker/Dockerfile | 1 | ||||
-rwxr-xr-x | functest/ci/config_functest.yaml | 2 | ||||
-rwxr-xr-x | functest/ci/prepare_env.py | 2 | ||||
-rw-r--r-- | functest/opnfv_tests/features/odl_sfc.py | 6 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/custom_tests/blacklist.txt | 16 | ||||
-rw-r--r-- | functest/utils/decorators.py | 9 | ||||
-rwxr-xr-x | functest/utils/functest_logger.py | 13 | ||||
-rw-r--r-- | kingbird_requirements.txt | 15 |
8 files changed, 59 insertions, 5 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 30c31dad3..134b8ef3c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -144,6 +144,7 @@ RUN cd ${REPOS_DIR}/bgpvpn && pip install -e . # Kingbird integration RUN cd ${REPOS_DIR}/kingbird && pip install -e . +RUN cd ${FUNCTEST_REPO_DIR} && pip install -r kingbird_requirements.txt # refstack-client integration RUN cd ${REPOS_DIR}/refstack-client && ./setup_env -t ${REFSTACK_TAG} diff --git a/functest/ci/config_functest.yaml b/functest/ci/config_functest.yaml index 4d5a62175..78f6257c8 100755 --- a/functest/ci/config_functest.yaml +++ b/functest/ci/config_functest.yaml @@ -200,4 +200,6 @@ example: sg_desc: Example Security group results: + # you can also set a dir (e.g. /home/opnfv/db) to dump results + # test_db_url: file:///home/opnfv/db test_db_url: http://testresults.opnfv.org/test/api/v1 diff --git a/functest/ci/prepare_env.py b/functest/ci/prepare_env.py index 724ea14df..e9a470f9c 100755 --- a/functest/ci/prepare_env.py +++ b/functest/ci/prepare_env.py @@ -312,7 +312,7 @@ def install_tempest(): logger.debug("Tempest %s does not exist" % CONST.tempest_deployment_name) cmd = ("rally verify create-verifier --source {0} " - "--name {1} --type tempest" + "--name {1} --type tempest --system-wide" .format(CONST.dir_repo_tempest, CONST.tempest_deployment_name)) error_msg = "Problem while installing Tempest." diff --git a/functest/opnfv_tests/features/odl_sfc.py b/functest/opnfv_tests/features/odl_sfc.py index 1956c9c8e..431cd47e4 100644 --- a/functest/opnfv_tests/features/odl_sfc.py +++ b/functest/opnfv_tests/features/odl_sfc.py @@ -8,6 +8,7 @@ # http://www.apache.org/licenses/LICENSE-2.0 # import functest.core.feature_base as base +from sfc.tests.functest import run_tests class OpenDaylightSFC(base.FeatureBase): @@ -16,5 +17,6 @@ class OpenDaylightSFC(base.FeatureBase): super(OpenDaylightSFC, self).__init__(project='sfc', case='functest-odl-sfc', repo='dir_repo_sfc') - dir_sfc_functest = '{}/sfc/tests/functest'.format(self.repo) - self.cmd = 'cd %s && python ./run_tests.py' % dir_sfc_functest + + def execute(self): + return run_tests.main() diff --git a/functest/opnfv_tests/openstack/tempest/custom_tests/blacklist.txt b/functest/opnfv_tests/openstack/tempest/custom_tests/blacklist.txt index fcdfe225b..43edabc10 100644 --- a/functest/opnfv_tests/openstack/tempest/custom_tests/blacklist.txt +++ b/functest/opnfv_tests/openstack/tempest/custom_tests/blacklist.txt @@ -55,3 +55,19 @@ - tempest.scenario.test_server_basic_ops.TestServerBasicOps.test_server_basic_ops - tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_volume_boot_pattern - tempest.scenario.test_volume_boot_pattern.TestVolumeBootPatternV2.test_volume_boot_pattern + +- + # https://bugs.launchpad.net/tempest/+bug/1577632 + scenarios: + - os-odl_l2-nofeature-ha + - os-odl_l2-nofeature-noha + - os-odl_l2-sfc-ha + - os-odl_l2-sfc-noha + - os-odl_l2-bgpvpn-ha + - os-odl_l2-bgpvpn-noha + - os-odl_l3-nofeature-ha + - os-odl_l3-nofeature-noha + installers: + - fuel + tests: + - tempest.scenario.test_server_basic_ops.TestServerBasicOps.test_server_basic_ops diff --git a/functest/utils/decorators.py b/functest/utils/decorators.py index 99bcef3e6..276235d96 100644 --- a/functest/utils/decorators.py +++ b/functest/utils/decorators.py @@ -1,6 +1,8 @@ #!/usr/bin/env python +import errno import mock +import os import requests.sessions import urlparse @@ -10,7 +12,12 @@ def can_dump_request_to_file(method): def dump_preparedrequest(request, **kwargs): parseresult = urlparse.urlparse(request.url) if parseresult.scheme == "file": - with open(parseresult.path.replace('/results', ''), 'a') as f: + try: + os.makedirs(parseresult.path) + except OSError as e: + if e.errno != errno.EEXIST: + raise + with open(os.path.join(parseresult.path, 'dump.txt'), 'a') as f: headers = "" for key in request.headers: headers += key + " " + request.headers[key] + "\n" diff --git a/functest/utils/functest_logger.py b/functest/utils/functest_logger.py index 022211cb7..555e9c28c 100755 --- a/functest/utils/functest_logger.py +++ b/functest/utils/functest_logger.py @@ -28,13 +28,24 @@ import json from functest.utils.constants import CONST +ignore = ["paramiko", + "stevedore.extension", + "keystoneauth.session", + "keystoneauth.identity.v3.base", + "novaclient.v2.client", + "neutronclient.v2_0.client", + "glanceclient.common.http", + "cinderclient.v2.client", + "cinderclient.client"] + class Logger(object): def __init__(self, logger_name): self.setup_logging() self.logger = logging.getLogger(logger_name) - logging.getLogger("paramiko").setLevel(logging.WARNING) + for module_name in ignore: + logging.getLogger(module_name).setLevel(logging.WARNING) def getLogger(self): return self.logger diff --git a/kingbird_requirements.txt b/kingbird_requirements.txt new file mode 100644 index 000000000..adf1082cb --- /dev/null +++ b/kingbird_requirements.txt @@ -0,0 +1,15 @@ +# +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +# +ddt==1.1.1 +oslosphinx==4.11.0 +oslotest==2.14.0 +pylint==1.4.5 +requests-mock==1.3.0 +tempest-lib==1.0.0 +testresources==2.0.1 +testscenarios==0.5.0 |