diff options
Diffstat (limited to 'functest/ci')
-rwxr-xr-x | functest/ci/check_os.sh | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | functest/ci/config_functest.yaml | 8 | ||||
-rw-r--r--[-rwxr-xr-x] | functest/ci/config_patch.yaml | 4 | ||||
-rw-r--r-- | functest/ci/installer_params.yaml | 8 | ||||
-rw-r--r-- | functest/ci/rally_aarch64_patch.conf | 4 | ||||
-rwxr-xr-x | functest/ci/run_tests.py | 5 | ||||
-rw-r--r--[-rwxr-xr-x] | functest/ci/testcases.yaml | 229 | ||||
-rw-r--r-- | functest/ci/tier_builder.py | 2 | ||||
-rw-r--r-- | functest/ci/tier_handler.py | 2 |
9 files changed, 168 insertions, 98 deletions
diff --git a/functest/ci/check_os.sh b/functest/ci/check_os.sh index 3920b7ac..83f9f476 100755 --- a/functest/ci/check_os.sh +++ b/functest/ci/check_os.sh @@ -69,7 +69,7 @@ fi echo "Checking OpenStack endpoints:" publicURL=$(openstack catalog show identity |awk '/public/ {print $4}') publicIP=$(echo $publicURL|sed 's/^.*http.*\:\/\///'|sed 's/.[^:]*$//') -publicPort=$(echo $publicURL|sed 's/^.*://'|sed 's/\/.*$//') +publicPort=$(echo $publicURL|grep -Po '(?<=:)\d+') https_enabled=$(echo $publicURL | grep 'https') if [[ -n $https_enabled ]]; then echo ">>Verifying SSL connectivity to the public endpoint $publicIP:$publicPort..." @@ -93,7 +93,7 @@ if [ -z ${adminURL} ]; then exit 1 fi adminIP=$(echo $adminURL|sed 's/^.*http.*\:\/\///'|sed 's/.[^:]*$//') -adminPort=$(echo $adminURL|sed 's/^.*://'|sed 's/.[^\/]*$//') +adminPort=$(echo $adminURL|grep -Po '(?<=:)\d+') https_enabled=$(echo $adminURL | grep 'https') if [[ -n $https_enabled ]]; then echo ">>Verifying SSL connectivity to the admin endpoint $adminIP:$adminPort..." diff --git a/functest/ci/config_functest.yaml b/functest/ci/config_functest.yaml index 95a4408a..f291cf1f 100755..100644 --- a/functest/ci/config_functest.yaml +++ b/functest/ci/config_functest.yaml @@ -125,7 +125,7 @@ rally: router_name: rally-router refstack: - tempest_conf_path: openstack/refstack_client/tempest.conf + tempest_conf_path: openstack/refstack_client/refstack_tempest.conf defcore_list: openstack/refstack_client/defcore.txt vnf: @@ -201,6 +201,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 + # you can also set a file (e.g. /home/opnfv/functest/results/dump.txt) to dump results + # test_db_url: file:///home/opnfv/functest/results/dump.txt + test_db_url: http://testresults.opnfv.org/test/api/v1/results diff --git a/functest/ci/config_patch.yaml b/functest/ci/config_patch.yaml index d984a3f4..d47766b6 100755..100644 --- a/functest/ci/config_patch.yaml +++ b/functest/ci/config_patch.yaml @@ -22,3 +22,7 @@ ovs: tempest: use_custom_images: True use_custom_flavors: True +multisite: + tempest: + use_custom_images: True + use_custom_flavors: True diff --git a/functest/ci/installer_params.yaml b/functest/ci/installer_params.yaml index 26aff9bb..77e9355f 100644 --- a/functest/ci/installer_params.yaml +++ b/functest/ci/installer_params.yaml @@ -2,10 +2,10 @@ apex: ip: '' user: 'stack' pkey: '/root/.ssh/id_rsa' -# compass: -# ip: '192.168.200.2' -# user: 'root' -# password: 'root' +compass: + ip: '192.168.200.2' + user: 'root' + password: 'root' fuel: ip: '10.20.0.2' user: 'root' diff --git a/functest/ci/rally_aarch64_patch.conf b/functest/ci/rally_aarch64_patch.conf index a49588bf..e5cae813 100644 --- a/functest/ci/rally_aarch64_patch.conf +++ b/functest/ci/rally_aarch64_patch.conf @@ -1,5 +1,5 @@ img_name_regex = ^TestVM$ img_url = http://download.cirros-cloud.net/daily/20161201/cirros-d161201-aarch64-disk.img -flavor_ref_ram = 128 +flavor_ref_ram = 256 flavor_ref_alt_ram = 256 -heat_instance_type_ram = 128 +heat_instance_type_ram = 256 diff --git a/functest/ci/run_tests.py b/functest/ci/run_tests.py index 5793c04a..e68901b8 100755 --- a/functest/ci/run_tests.py +++ b/functest/ci/run_tests.py @@ -144,7 +144,8 @@ def run_test(test, tier_name, testcases=None): try: module = importlib.import_module(run_dict['module']) cls = getattr(module, run_dict['class']) - test_case = cls(case_name=test_name) + test_dict = ft_utils.get_dict_by_test(test_name) + test_case = cls(**test_dict) try: kwargs = run_dict['args'] @@ -154,7 +155,7 @@ def run_test(test, tier_name, testcases=None): if result == testcase.TestCase.EX_OK: if GlobalVariables.REPORT_FLAG: test_case.push_to_db() - result = test_case.check_criteria() + result = test_case.check_result() except ImportError: logger.exception("Cannot import module {}".format( run_dict['module'])) diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml index 23b214bb..7009e910 100755..100644 --- a/functest/ci/testcases.yaml +++ b/functest/ci/testcases.yaml @@ -8,8 +8,9 @@ tiers: operations in the VIM. testcases: - - name: connection_check - criteria: 'status == "PASS"' + case_name: connection_check + project_name: functest + criteria: 100 blocking: true clean_flag: false description: >- @@ -27,8 +28,9 @@ tiers: class: 'ConnectionCheck' - - name: api_check - criteria: 'status == "PASS"' + case_name: api_check + project_name: functest + criteria: 100 blocking: true clean_flag: false description: >- @@ -45,8 +47,9 @@ tiers: module: 'functest.opnfv_tests.openstack.snaps.api_check' class: 'ApiCheck' - - name: snaps_health_check - criteria: 'status == "PASS"' + case_name: snaps_health_check + project_name: functest + criteria: 100 blocking: true clean_flag: false description: >- @@ -68,8 +71,9 @@ tiers: Set of basic Functional tests to validate the OPNFV scenarios. testcases: - - name: vping_ssh - criteria: 'status == "PASS"' + case_name: vping_ssh + project_name: functest + criteria: 100 blocking: true clean_flag: true description: >- @@ -84,8 +88,9 @@ tiers: class: 'VPingSSH' - - name: vping_userdata - criteria: 'status == "PASS"' + case_name: vping_userdata + project_name: functest + criteria: 100 blocking: true clean_flag: true description: >- @@ -99,8 +104,9 @@ tiers: class: 'VPingUserdata' - - name: tempest_smoke_serial - criteria: 'success_rate == 100%' + case_name: tempest_smoke_serial + project_name: functest + criteria: 100 blocking: false clean_flag: true description: >- @@ -116,8 +122,9 @@ tiers: class: 'TempestSmokeSerial' - - name: rally_sanity - criteria: 'success_rate == 100%' + case_name: rally_sanity + project_name: functest + criteria: 100 blocking: false clean_flag: false description: >- @@ -131,8 +138,9 @@ tiers: class: 'RallySanity' - - name: refstack_defcore - criteria: 'success_rate == 100%' + case_name: refstack_defcore + project_name: functest + criteria: 100 blocking: false clean_flag: true description: >- @@ -146,8 +154,9 @@ tiers: class: 'RefstackClient' - - name: odl - criteria: 'success_rate == 100%' + case_name: odl + project_name: functest + criteria: 100 blocking: true clean_flag: false description: >- @@ -166,8 +175,9 @@ tiers: - /home/opnfv/repos/odl_test/csit/suites/openstack/neutron - - name: odl_netvirt - criteria: 'success_rate == 100%' + case_name: odl_netvirt + project_name: functest + criteria: 100 blocking: false clean_flag: false description: >- @@ -188,8 +198,9 @@ tiers: - /home/opnfv/repos/odl_test/csit/suites/openstack/connectivity - - name: fds - criteria: 'success_rate == 100%' + case_name: fds + project_name: functest + criteria: 100 blocking: false clean_flag: false description: >- @@ -207,8 +218,9 @@ tiers: - /home/opnfv/repos/fds/testing/robot - - name: onos - criteria: 'status == "PASS"' + case_name: onos + project_name: functest + criteria: 100 blocking: true clean_flag: true description: >- @@ -223,8 +235,9 @@ tiers: class: 'Onos' - - name: snaps_smoke - criteria: 'status == "PASS"' + case_name: snaps_smoke + project_name: functest + criteria: 100 blocking: false clean_flag: false description: >- @@ -252,8 +265,9 @@ tiers: integrated in functest testcases: - - name: promise - criteria: 'success_rate == 100%' + case_name: promise + project_name: promise + criteria: 100 blocking: false clean_flag: true description: >- @@ -262,12 +276,15 @@ tiers: installer: '(fuel)|(joid)' scenario: '' run: - module: 'functest.opnfv_tests.features.promise' - class: 'Promise' + module: 'functest.core.feature' + class: 'BashFeature' + args: + cmd: 'cd /home/opnfv/repos/promise/promise/test/functest && python ./run_tests.py' - - name: doctor - criteria: 'status == "PASS"' + case_name: doctor-notification + project_name: doctor + criteria: 100 blocking: false clean_flag: true description: >- @@ -276,12 +293,15 @@ tiers: installer: '(apex)|(fuel)' scenario: '^((?!fdio).)*$' run: - module: 'functest.opnfv_tests.features.doctor' - class: 'Doctor' + module: 'functest.core.feature' + class: 'BashFeature' + args: + cmd: 'cd /home/opnfv/repos/doctor/tests && ./run.sh' - - name: bgpvpn - criteria: 'status == "PASS"' + case_name: bgpvpn + project_name: sdnvpn + criteria: 100 blocking: false clean_flag: true description: >- @@ -290,12 +310,15 @@ tiers: installer: '(fuel)|(apex)|(netvirt)' scenario: 'bgpvpn' run: - module: 'functest.opnfv_tests.features.sdnvpn' - class: 'SdnVpnTests' + module: 'functest.core.feature' + class: 'BashFeature' + args: + cmd: 'cd /home/opnfv/repos/sdnvpn/sdnvpn/test/functest && python ./run_tests.py' - - name: security_scan - criteria: 'status == "PASS"' + case_name: security_scan + project_name: securityscanning + criteria: 100 blocking: false clean_flag: true description: >- @@ -304,12 +327,32 @@ tiers: installer: 'apex' scenario: '^((?!fdio).)*$' run: - module: 'functest.opnfv_tests.features.security_scan' - class: 'SecurityScan' + module: 'functest.core.feature' + class: 'BashFeature' + args: + cmd: '. /home/opnfv/functest/conf/stackrc && cd /home/opnfv/repos/securityscanning && python security_scan.py --config config.ini && cd -' + + - + case_name: copper + project_name: copper + criteria: 100 + blocking: false + clean_flag: true + description: >- + Test suite for policy management based on OpenStack Congress + dependencies: + installer: 'apex' + scenario: '^((?!fdio).)*$' + run: + module: 'functest.core.feature' + class: 'BashFeature' + args: + cmd: 'cd /home/opnfv/repos/copper/tests && bash run.sh && cd -' - - name: multisite - criteria: 'success_rate == 100%' + case_name: multisite + project_name: multisite + criteria: 100 blocking: false clean_flag: false description: >- @@ -321,8 +364,9 @@ tiers: module: 'functest.opnfv_tests.openstack.tempest.tempest' class: 'TempestMultisite' - - name: odl-sfc - criteria: 'status == "PASS"' + case_name: functest-odl-sfc + project_name: sfc + criteria: 100 blocking: false clean_flag: true description: >- @@ -331,11 +375,14 @@ tiers: installer: '(apex)|(fuel)' scenario: 'odl_l2-sfc' run: - module: 'functest.opnfv_tests.features.odl_sfc' - class: 'OpenDaylightSFC' + module: 'functest.core.feature' + class: 'BashFeature' + args: + cmd: 'cd /home/opnfv/repos/sfc/sfc/tests/functest && python ./run_tests.py' - - name: onos_sfc - criteria: 'status == "PASS"' + case_name: onos_sfc + project_name: functest + criteria: 100 blocking: true clean_flag: true description: >- @@ -347,8 +394,9 @@ tiers: module: 'functest.opnfv_tests.sdn.onos.onos' class: 'OnosSfc' - - name: parser - criteria: 'ret == 0' + case_name: parser-basics + project_name: parser + criteria: 100 blocking: false clean_flag: true description: >- @@ -357,11 +405,14 @@ tiers: installer: 'fuel' scenario: '^((?!bgpvpn|noha).)*$' run: - module: 'functest.opnfv_tests.vnf.rnc.parser' - class: 'Parser' + module: 'functest.core.feature' + class: 'BashFeature' + args: + cmd: 'cd /home/opnfv/repos/parser/tests && ./functest_run.sh' - - name: domino - criteria: 'status == "PASS"' + case_name: domino-multinode + project_name: domino + criteria: 100 blocking: false clean_flag: true description: >- @@ -370,11 +421,14 @@ tiers: installer: '' scenario: '' run: - module: 'functest.opnfv_tests.features.domino' - class: 'Domino' + module: 'functest.core.feature' + class: 'BashFeature' + args: + cmd: 'cd /home/opnfv/repos/domino && ./tests/run_multinode.sh' - - name: netready - criteria: 'status == "PASS"' + case_name: gluon_vping + project_name: netready + criteria: 100 blocking: false clean_flag: true description: >- @@ -383,11 +437,14 @@ tiers: installer: 'apex' scenario: 'gluon' run: - module: 'functest.opnfv_tests.features.netready' - class: 'GluonVping' + module: 'functest.core.feature' + class: 'BashFeature' + args: + cmd: 'cd /home/opnfv/repos/netready/test/functest && python ./gluon-test-suite.py' - - name: barometer - criteria: 'status == "PASS"' + case_name: barometercollectd + project_name: barometer + criteria: 100 blocking: false clean_flag: true description: >- @@ -409,8 +466,9 @@ tiers: Extensive testing of OpenStack API. testcases: - - name: tempest_full_parallel - criteria: 'success_rate >= 80%' + case_name: tempest_full_parallel + project_name: functest + criteria: 80 blocking: false clean_flag: true description: >- @@ -424,8 +482,9 @@ tiers: module: 'functest.opnfv_tests.openstack.tempest.tempest' class: 'TempestFullParallel' - - name: tempest_custom - criteria: 'success_rate == 100%' + case_name: tempest_custom + project_name: functest + criteria: 100 blocking: false clean_flag: true description: >- @@ -441,8 +500,9 @@ tiers: module: 'functest.opnfv_tests.openstack.tempest.tempest' class: 'TempestCustom' - - name: rally_full - criteria: 'success_rate >= 90%' + case_name: rally_full + project_name: functest + criteria: 90 blocking: false clean_flag: false description: >- @@ -463,8 +523,9 @@ tiers: Collection of VNF test cases. testcases: - - name: cloudify_ims - criteria: 'status == "PASS"' + case_name: cloudify_ims + project_name: functest + criteria: 100 blocking: false clean_flag: true description: >- @@ -477,8 +538,9 @@ tiers: module: 'functest.opnfv_tests.vnf.ims.cloudify_ims' class: 'CloudifyIms' # - -# name: aaa -# criteria: 'ret == 0' +# case_name: aaa +# project_name: functest +# criteria: 100 # blocking: false # clean_flag: true # description: >- @@ -490,8 +552,9 @@ tiers: # module: 'functest.opnfv_tests.vnf.aaa.aaa' # class: 'AaaVnf' - - name: orchestra_ims - criteria: 'ret == 0' + case_name: orchestra_ims + project_name: functest + criteria: 100 blocking: false clean_flag: true description: >- @@ -504,22 +567,24 @@ tiers: class: 'ImsVnf' - - name: opera_ims - criteria: 'status == "PASS"' + case_name: opera_vims + project_name: opera + criteria: 100 blocking: false clean_flag: true description: >- VNF deployment with OPEN-O dependencies: - installer: 'unknown' - scenario: 'unknown' + installer: 'compass' + scenario: 'os-nosdn-openo-ha' run: module: 'functest.opnfv_tests.vnf.ims.opera_ims' class: 'OperaIms' - - name: vyos_vrouter - criteria: 'status == "PASS"' + case_name: vyos_vrouter + project_name: functest + criteria: 100 blocking: false clean_flag: true description: >- diff --git a/functest/ci/tier_builder.py b/functest/ci/tier_builder.py index f4c6f70f..44b27258 100644 --- a/functest/ci/tier_builder.py +++ b/functest/ci/tier_builder.py @@ -46,7 +46,7 @@ class TierBuilder(object): scenario = dic_testcase['dependencies']['scenario'] dep = th.Dependency(installer, scenario) - testcase = th.TestCase(name=dic_testcase['name'], + testcase = th.TestCase(name=dic_testcase['case_name'], dependency=dep, criteria=dic_testcase['criteria'], blocking=dic_testcase['blocking'], diff --git a/functest/ci/tier_handler.py b/functest/ci/tier_handler.py index 6b4864b5..fe7372a3 100644 --- a/functest/ci/tier_handler.py +++ b/functest/ci/tier_handler.py @@ -158,7 +158,7 @@ class TestCase(object): for line in lines: out += ("| " + line.ljust(LINE_LENGTH - 7) + " |\n") out += ("| Criteria: " + - self.criteria.ljust(LINE_LENGTH - 14) + "|\n") + str(self.criteria).ljust(LINE_LENGTH - 14) + "|\n") out += ("| Dependencies:".ljust(LINE_LENGTH - 1) + "|\n") installer = self.dependency.get_installer() scenario = self.dependency.get_scenario() |