diff options
25 files changed, 36 insertions, 51 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 30c31dad..176c109e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -120,8 +120,20 @@ RUN cd ${REPOS_DIR}/barometer \ && pip install . RUN find ${FUNCTEST_REPO_DIR} -name "*.py" \ - -not -path "*tests/unit*" |xargs grep __main__ |cut -d\: -f 1 |xargs chmod -c 755 \ - && find ${FUNCTEST_REPO_DIR} -name "*.sh" |xargs grep \#\! |cut -d\: -f 1 |xargs chmod -c 755 + -not -path "*tests/unit*" \ + -not -path "*functest_venv*" \ + |xargs grep -L __main__ |cut -d\: -f 1 |xargs chmod -c 644 && + find ${FUNCTEST_REPO_DIR} -name "*.sh" \ + -not -path "*functest_venv*" \ + |xargs grep -L \#\! |cut -d\: -f 1 |xargs chmod -c 644 + +RUN find ${FUNCTEST_REPO_DIR} -name "*.py" \ + -not -path "*tests/unit*" \ + -not -path "*functest_venv*" \ + |xargs grep __main__ |cut -d\: -f 1 |xargs chmod -c 755 && + find ${FUNCTEST_REPO_DIR} -name "*.sh" \ + -not -path "*functest_venv*" \ + |xargs grep \#\! |cut -d\: -f 1 |xargs chmod -c 755 RUN /bin/bash ${REPOS_DIR}/parser/tests/parser_install.sh ${REPOS_DIR} RUN ${REPOS_DIR}/rally/install_rally.sh --yes diff --git a/docker/Dockerfile.aarch64 b/docker/Dockerfile.aarch64 index 15f0bdc3..60f72a29 100644 --- a/docker/Dockerfile.aarch64 +++ b/docker/Dockerfile.aarch64 @@ -112,8 +112,20 @@ RUN cd ${RELENG_MODULE_DIR} \ && pip install -e . RUN find ${FUNCTEST_REPO_DIR} -name "*.py" \ - -not -path "*tests/unit*" |xargs grep __main__ |cut -d\: -f 1 |xargs chmod -c 755 \ - && find ${FUNCTEST_REPO_DIR} -name "*.sh" |xargs grep \#\! |cut -d\: -f 1 |xargs chmod -c 755 + -not -path "*tests/unit*" \ + -not -path "*functest_venv*" \ + |xargs grep -L __main__ |cut -d\: -f 1 |xargs chmod -c 644 && + find ${FUNCTEST_REPO_DIR} -name "*.sh" \ + -not -path "*functest_venv*" \ + |xargs grep -L \#\! |cut -d\: -f 1 |xargs chmod -c 644 + +RUN find ${FUNCTEST_REPO_DIR} -name "*.py" \ + -not -path "*tests/unit*" \ + -not -path "*functest_venv*" \ + |xargs grep __main__ |cut -d\: -f 1 |xargs chmod -c 755 && + find ${FUNCTEST_REPO_DIR} -name "*.sh" \ + -not -path "*functest_venv*" \ + |xargs grep \#\! |cut -d\: -f 1 |xargs chmod -c 755 RUN /bin/bash ${REPOS_DIR}/parser/tests/parser_install.sh ${REPOS_DIR} RUN ${REPOS_DIR}/rally/install_rally.sh --yes diff --git a/functest/ci/__init__.py b/functest/ci/__init__.py index e69de29b..e69de29b 100755..100644 --- a/functest/ci/__init__.py +++ b/functest/ci/__init__.py diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml index e3d5ffad..14977556 100755 --- a/functest/ci/testcases.yaml +++ b/functest/ci/testcases.yaml @@ -132,7 +132,7 @@ tiers: - name: refstack_defcore - criteria: 'success_rate >= 80%' + criteria: 'success_rate == 100%' blocking: false clean_flag: false description: >- @@ -436,20 +436,6 @@ tiers: # module: 'functest.opnfv_tests.openstack.tempest.tempest' # class: 'TempestFullParallel' - - name: tempest_defcore - criteria: 'success_rate == 100%' - blocking: false - clean_flag: false - description: >- - This is the set of Tempest test cases created by OpenStack - Interop Working Group for certification purposes. - dependencies: - installer: '' - scenario: 'nosdn-nofeature-ha' - run: - module: 'functest.opnfv_tests.openstack.tempest.tempest' - class: 'TempestDefcore' - - name: tempest_custom criteria: 'success_rate == 100%' blocking: false diff --git a/functest/ci/tier_builder.py b/functest/ci/tier_builder.py index f4c6f70f..f4c6f70f 100755..100644 --- a/functest/ci/tier_builder.py +++ b/functest/ci/tier_builder.py diff --git a/functest/ci/tier_handler.py b/functest/ci/tier_handler.py index 6b4864b5..6b4864b5 100755..100644 --- a/functest/ci/tier_handler.py +++ b/functest/ci/tier_handler.py diff --git a/functest/opnfv_tests/features/copper.py b/functest/opnfv_tests/features/copper.py index 735b315d..735b315d 100755..100644 --- a/functest/opnfv_tests/features/copper.py +++ b/functest/opnfv_tests/features/copper.py diff --git a/functest/opnfv_tests/features/doctor.py b/functest/opnfv_tests/features/doctor.py index 4d295a67..4d295a67 100755..100644 --- a/functest/opnfv_tests/features/doctor.py +++ b/functest/opnfv_tests/features/doctor.py diff --git a/functest/opnfv_tests/features/domino.py b/functest/opnfv_tests/features/domino.py index b36220fa..b36220fa 100755..100644 --- a/functest/opnfv_tests/features/domino.py +++ b/functest/opnfv_tests/features/domino.py diff --git a/functest/opnfv_tests/features/promise.py b/functest/opnfv_tests/features/promise.py index 15636fbf..15636fbf 100755..100644 --- a/functest/opnfv_tests/features/promise.py +++ b/functest/opnfv_tests/features/promise.py diff --git a/functest/opnfv_tests/features/sdnvpn.py b/functest/opnfv_tests/features/sdnvpn.py index 1919a03c..1919a03c 100755..100644 --- a/functest/opnfv_tests/features/sdnvpn.py +++ b/functest/opnfv_tests/features/sdnvpn.py diff --git a/functest/opnfv_tests/features/security_scan.py b/functest/opnfv_tests/features/security_scan.py index 58f0ec74..58f0ec74 100755..100644 --- a/functest/opnfv_tests/features/security_scan.py +++ b/functest/opnfv_tests/features/security_scan.py diff --git a/functest/opnfv_tests/mano/orchestra.py b/functest/opnfv_tests/mano/orchestra.py index fd5e40d0..fd5e40d0 100755..100644 --- a/functest/opnfv_tests/mano/orchestra.py +++ b/functest/opnfv_tests/mano/orchestra.py diff --git a/functest/opnfv_tests/openstack/healthcheck/healthcheck.sh b/functest/opnfv_tests/openstack/healthcheck/healthcheck.sh index 7fa957c0..7fa957c0 100755..100644 --- a/functest/opnfv_tests/openstack/healthcheck/healthcheck.sh +++ b/functest/opnfv_tests/openstack/healthcheck/healthcheck.sh diff --git a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py index c9f0f275..7d4c568a 100755 --- a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py +++ b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py @@ -129,10 +129,10 @@ class RefstackClient(testcase_base.TestcaseBase): num_executed = int(num_tests) - int(num_skipped) success_rate = 100 * int(num_success) / int(num_executed) - self.details = {"num_tests": int(num_tests), - "num_failures": int(num_failures), + self.details = {"tests": int(num_tests), + "failures": int(num_failures), "success": success_testcases, - "failed": failed_testcases, + "errors": failed_testcases, "skipped": skipped_testcases} except Exception: success_rate = 0 diff --git a/functest/opnfv_tests/vnf/ims/cloudify_ims.py b/functest/opnfv_tests/vnf/ims/cloudify_ims.py index 74470add..f7dfd532 100644 --- a/functest/opnfv_tests/vnf/ims/cloudify_ims.py +++ b/functest/opnfv_tests/vnf/ims/cloudify_ims.py @@ -203,7 +203,7 @@ class ImsVnf(vnf_base.VnfOnBoardingBase): flavor_exist, flavor_id = os_utils.get_or_create_flavor( "m1.small", self.vnf['requirements']['ram_min'], - '20', + '30', '1', public=True) self.logger.debug("Flavor id: %s" % flavor_id) diff --git a/functest/opnfv_tests/vnf/ims/cloudify_ims.yaml b/functest/opnfv_tests/vnf/ims/cloudify_ims.yaml index b84ef8fd..74b9e958 100644 --- a/functest/opnfv_tests/vnf/ims/cloudify_ims.yaml +++ b/functest/opnfv_tests/vnf/ims/cloudify_ims.yaml @@ -6,7 +6,7 @@ cloudify: url: https://github.com/boucherv-orange/cloudify-manager-blueprints.git branch: '3.3.1-build' requirements: - ram_min: 4000 + ram_min: 4096 os_image: centos_7 inputs: keystone_username: "" @@ -29,7 +29,7 @@ clearwater: branch: stable deployment_name: clearwater-opnfv requirements: - ram_min: 2000 + ram_min: 2048 os_image: ubuntu_14.04 inputs: image_id: '' diff --git a/functest/opnfv_tests/vnf/ims/opera_ims.py b/functest/opnfv_tests/vnf/ims/opera_ims.py index 7ead401f..7ead401f 100644..100755 --- a/functest/opnfv_tests/vnf/ims/opera_ims.py +++ b/functest/opnfv_tests/vnf/ims/opera_ims.py diff --git a/functest/opnfv_tests/vnf/ims/orchestra_ims.py b/functest/opnfv_tests/vnf/ims/orchestra_ims.py index d13fe8fe..d13fe8fe 100644..100755 --- a/functest/opnfv_tests/vnf/ims/orchestra_ims.py +++ b/functest/opnfv_tests/vnf/ims/orchestra_ims.py diff --git a/functest/opnfv_tests/vnf/router/__init__.py b/functest/opnfv_tests/vnf/router/__init__.py index e69de29b..e69de29b 100755..100644 --- a/functest/opnfv_tests/vnf/router/__init__.py +++ b/functest/opnfv_tests/vnf/router/__init__.py diff --git a/functest/opnfv_tests/vnf/router/vyos_vrouter.py b/functest/opnfv_tests/vnf/router/vyos_vrouter.py index 94a3ecfd..94a3ecfd 100755..100644 --- a/functest/opnfv_tests/vnf/router/vyos_vrouter.py +++ b/functest/opnfv_tests/vnf/router/vyos_vrouter.py diff --git a/functest/tests/unit/utils/test_functest_utils.py b/functest/tests/unit/utils/test_functest_utils.py index e5bae62f..eb241e5d 100644 --- a/functest/tests/unit/utils/test_functest_utils.py +++ b/functest/tests/unit/utils/test_functest_utils.py @@ -295,25 +295,6 @@ class FunctestUtilsTesting(unittest.TestCase): def test_push_results_to_db_missing_buildtag(self): self._test_push_results_to_db_missing_env('BUILD_TAG') - def test_push_results_to_db_incorrect_buildtag(self): - dic = self._get_env_dict(None) - dic['BUILD_TAG'] = 'incorrect_build_tag' - with mock.patch('functest.utils.functest_utils.get_db_url', - return_value=self.db_url), \ - mock.patch.dict(os.environ, - dic, - clear=True), \ - mock.patch('functest.utils.functest_utils.logger.error') \ - as mock_logger_error: - self.assertFalse(functest_utils. - push_results_to_db(self.project, self.case_name, - self.start_date, - self.stop_date, - self.criteria, self.details)) - mock_logger_error.assert_called_once_with("Please fix BUILD_TAG" - " env var: incorrect_" - "build_tag") - def test_push_results_to_db_request_post_failed(self): dic = self._get_env_dict(None) with mock.patch('functest.utils.functest_utils.get_db_url', diff --git a/functest/utils/functest_logger.py b/functest/utils/functest_logger.py index 022211cb..022211cb 100755..100644 --- a/functest/utils/functest_logger.py +++ b/functest/utils/functest_logger.py diff --git a/functest/utils/functest_utils.py b/functest/utils/functest_utils.py index 9e13ffe9..7cc5029d 100644 --- a/functest/utils/functest_utils.py +++ b/functest/utils/functest_utils.py @@ -207,13 +207,7 @@ def push_results_to_db(project, case_name, except KeyError as e: logger.error("Please set env var: " + str(e)) return False - rule = "daily-(.+?)-[0-9]*" - m = re.search(rule, build_tag) - if m: - version = m.group(1) - else: - logger.error("Please fix BUILD_TAG env var: " + build_tag) - return False + version = get_version() test_start = dt.fromtimestamp(start_date).strftime('%Y-%m-%d %H:%M:%S') test_stop = dt.fromtimestamp(stop_date).strftime('%Y-%m-%d %H:%M:%S') diff --git a/functest/utils/openstack_utils.py b/functest/utils/openstack_utils.py index e33af63b..e33af63b 100755..100644 --- a/functest/utils/openstack_utils.py +++ b/functest/utils/openstack_utils.py |