diff options
-rw-r--r-- | docker/vnf/testcases.yaml | 2 | ||||
-rw-r--r-- | functest/ci/download_images.sh | 10 | ||||
-rw-r--r-- | functest/ci/testcases.yaml | 2 | ||||
-rw-r--r-- | functest/opnfv_tests/vnf/ims/cloudify_ims.py | 27 |
4 files changed, 26 insertions, 15 deletions
diff --git a/docker/vnf/testcases.yaml b/docker/vnf/testcases.yaml index 8aa2c795..c0eba822 100644 --- a/docker/vnf/testcases.yaml +++ b/docker/vnf/testcases.yaml @@ -9,7 +9,7 @@ tiers: - case_name: cloudify_ims project_name: functest - criteria: 100 + criteria: 80 blocking: false description: >- This test case deploys an OpenSource vIMS solution from Clearwater diff --git a/functest/ci/download_images.sh b/functest/ci/download_images.sh index 2f7a207d..367ad8d9 100644 --- a/functest/ci/download_images.sh +++ b/functest/ci/download_images.sh @@ -5,17 +5,17 @@ set -ex wget_opts="-N --tries=1 --connect-timeout=30" cat << EOF | wget ${wget_opts} -i - -P ${1:-/home/opnfv/functest/images} -http://artifacts.opnfv.org/functest/images/cirros-0.3.5-x86_64-disk.img +http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img https://cloud-images.ubuntu.com/releases/14.04/release/ubuntu-14.04-server-cloudimg-amd64-disk1.img https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2 https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img http://repository.cloudifysource.org/cloudify/4.0.1/sp-release/cloudify-manager-premium-4.0.1.qcow2 http://marketplace.openbaton.org:8082/api/v1/images/52e2ccc0-1dce-4663-894d-28aab49323aa/img http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img -http://artifacts.opnfv.org/functest/images/cirros-0.3.5-x86_64-lxc.tar.gz -http://artifacts.opnfv.org/functest/images/cirros-d161201-aarch64-disk.img -http://artifacts.opnfv.org/functest/images/cirros-d161201-aarch64-initramfs -http://artifacts.opnfv.org/functest/images/cirros-d161201-aarch64-kernel +http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-lxc.tar.gz +http://download.cirros-cloud.net/daily/20161201/cirros-d161201-aarch64-disk.img +http://download.cirros-cloud.net/daily/20161201/cirros-d161201-aarch64-initramfs +http://download.cirros-cloud.net/daily/20161201/cirros-d161201-aarch64-kernel https://cloud-images.ubuntu.com/releases/14.04/release/ubuntu-14.04-server-cloudimg-arm64-uefi1.img http://cloud.centos.org/altarch/7/images/aarch64/CentOS-7-aarch64-GenericCloud.qcow2.xz https://sourceforge.net/projects/ool-opnfv/files/vyos-1.1.7.img diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml index 9f9e402a..868fbecd 100644 --- a/functest/ci/testcases.yaml +++ b/functest/ci/testcases.yaml @@ -435,7 +435,7 @@ tiers: - case_name: cloudify_ims project_name: functest - criteria: 100 + criteria: 80 blocking: false description: >- This test case deploys an OpenSource vIMS solution from Clearwater diff --git a/functest/opnfv_tests/vnf/ims/cloudify_ims.py b/functest/opnfv_tests/vnf/ims/cloudify_ims.py index b07eaee2..8ed7f0dd 100644 --- a/functest/opnfv_tests/vnf/ims/cloudify_ims.py +++ b/functest/opnfv_tests/vnf/ims/cloudify_ims.py @@ -281,6 +281,7 @@ class CloudifyIms(clearwater_ims_base.ClearwaterOnBoardingBase): external_network_name=ext_net_name, network_name=network_settings.name )) + self.result = 1/3 * 100 return True def deploy_vnf(self): @@ -330,6 +331,7 @@ class CloudifyIms(clearwater_ims_base.ClearwaterOnBoardingBase): self.__logger.info(execution) if execution.status == 'terminated': self.details['vnf'].update(status='PASS', duration=duration) + self.result += 1/3 * 100 result = True else: self.details['vnf'].update(status='FAIL', duration=duration) @@ -355,12 +357,20 @@ class CloudifyIms(clearwater_ims_base.ClearwaterOnBoardingBase): dns_ip=dns_ip, public_domain=self.vnf['inputs']["public_domain"]) duration = time.time() - start_time - short_result = sig_test_format(vims_test_result) + short_result, nb_test = sig_test_format(vims_test_result) self.__logger.info(short_result) - self.details['test_vnf'].update(status='PASS', - result=short_result, + self.details['test_vnf'].update(result=short_result, full_result=vims_test_result, duration=duration) + try: + vnf_test_rate = short_result['passed'] / nb_test + # orchestrator + vnf + test_vnf + self.result += vnf_test_rate / 3 * 100 + except ZeroDivisionError: + self.__logger.error("No test has been executed") + self.details['test_vnf'].update(status='FAIL') + return False + return True def clean(self): @@ -507,11 +517,12 @@ def sig_test_format(sig_test): nb_failures += 1 elif data_test['result'] == "Skipped": nb_skipped += 1 - total_sig_test_result = {} - total_sig_test_result['passed'] = nb_passed - total_sig_test_result['failures'] = nb_failures - total_sig_test_result['skipped'] = nb_skipped - return total_sig_test_result + short_sig_test_result = {} + short_sig_test_result['passed'] = nb_passed + short_sig_test_result['failures'] = nb_failures + short_sig_test_result['skipped'] = nb_skipped + nb_test = nb_passed + nb_skipped + return (short_sig_test_result, nb_test) def run_blocking_ssh_command(ssh, cmd, error_msg="Unable to run this command"): |