summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlas Kozat <ulas.kozat@gmail.com>2016-07-12 15:59:05 -0700
committerjose.lausuch <jose.lausuch@ericsson.com>2016-07-14 20:20:18 +0200
commit649151b1577ac2485c77a40e5fa3de02c1adb3fa (patch)
tree81fa19e709edb42072d65d5181b76213d5125f84
parentee529409814e8452d409d9c5e8c56a047a483cd8 (diff)
Enable domino multi-node test case in Functest
This includes: - Add domino.py script - Add call to domino.py - Add the Domino repo in the Dockerfile - Add the test case definition in testcases.yaml JIRA: FUNCTEST-246 Change-Id: I5a8c3345a14c43fa80e6e86678ae5fb1417b3147 Signed-off-by: Ulas Kozat <ulas.kozat@gmail.com>
-rwxr-xr-xci/exec_test.sh2
-rw-r--r--ci/testcases.yaml9
-rw-r--r--docker/Dockerfile1
-rwxr-xr-xtestcases/features/domino.py83
4 files changed, 94 insertions, 1 deletions
diff --git a/ci/exec_test.sh b/ci/exec_test.sh
index 375164295..246905bca 100755
--- a/ci/exec_test.sh
+++ b/ci/exec_test.sh
@@ -149,6 +149,8 @@ function run_test(){
python ${FUNCTEST_REPO_DIR}/testcases/features/multisite.py
python ${FUNCTEST_REPO_DIR}/testcases/OpenStack/tempest/run_tempest.py \
$clean_flag -s -m feature_multisite $report
+ "domino")
+ python ${FUNCTEST_REPO_DIR}/testcases/features/domino.py
;;
*)
echo "The test case '${test_name}' does not exist."
diff --git a/ci/testcases.yaml b/ci/testcases.yaml
index 2cf7cc4c2..b4d9b07e9 100644
--- a/ci/testcases.yaml
+++ b/ci/testcases.yaml
@@ -166,7 +166,14 @@ tiers:
dependencies:
installer: 'compass'
scenario: 'multisite'
-
+ -
+ name: domino
+ criteria: 'status == "PASS"'
+ description: >-
+ Test suite for template distribution based on Domino
+ dependencies:
+ installer: 'joid'
+ scenario: ''
-
name: openstack
order: 4
diff --git a/docker/Dockerfile b/docker/Dockerfile
index b8ee71f48..3053382da 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -82,6 +82,7 @@ RUN git clone https://gerrit.opnfv.org/gerrit/copper ${repos_dir}/copper
RUN git clone https://gerrit.opnfv.org/gerrit/moon ${repos_dir}/moon
RUN git clone https://gerrit.opnfv.org/gerrit/sdnvpn ${repos_dir}/sdnvpn
RUN git clone https://github.com/openstack/kingbird.git ${repos_dir}/kingbird
+RUN git clone https://gerrit.opnfv.org/gerrit/domino ${repos_dir}/domino
RUN pip install -r ${repos_dir}/functest/docker/requirements.pip
RUN pip install -r ${repos_dir}/rally/requirements.txt
diff --git a/testcases/features/domino.py b/testcases/features/domino.py
new file mode 100755
index 000000000..ff14d066c
--- /dev/null
+++ b/testcases/features/domino.py
@@ -0,0 +1,83 @@
+#!/usr/bin/python
+#
+# Copyright (c) 2015 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
+#
+# 0.1: This script boots the VM1 and allocates IP address from Nova
+# Later, the VM2 boots then execute cloud-init to ping VM1.
+# After successful ping, both the VMs are deleted.
+# 0.2: measure test duration and publish results under json format
+#
+#
+
+import os
+import time
+import yaml
+
+import functest.utils.functest_logger as ft_logger
+import functest.utils.functest_utils as functest_utils
+
+with open(os.environ["CONFIG_FUNCTEST_YAML"]) as f:
+ functest_yaml = yaml.safe_load(f)
+
+dirs = functest_yaml.get('general').get('directories')
+FUNCTEST_REPO = dirs.get('dir_repo_functest')
+DOMINO_REPO = dirs.get('dir_repo_domino')
+TEST_DB_URL = functest_yaml.get('results').get('test_db_url')
+
+logger = ft_logger.Logger("domino").getLogger()
+
+
+def main():
+ cmd = 'cd %s && ./tests/run_multinode.sh' % DOMINO_REPO
+ start_time = time.time()
+
+ ret = functest_utils.execute_command(cmd, logger, exit_on_error=False)
+
+ stop_time = time.time()
+ duration = round(stop_time - start_time, 1)
+ if ret == 0:
+ logger.info("domino OK")
+ test_status = 'OK'
+ else:
+ logger.info("domino FAILED")
+ test_status = 'NOK'
+
+ details = {
+ 'timestart': start_time,
+ 'duration': duration,
+ 'status': test_status,
+ }
+ pod_name = functest_utils.get_pod_name(logger)
+ scenario = functest_utils.get_scenario(logger)
+ version = functest_utils.get_version(logger)
+ build_tag = functest_utils.get_build_tag(logger)
+
+ status = "FAIL"
+ if details['status'] == "OK":
+ status = "PASS"
+
+ logger.info("Pushing Domino results: TEST_DB_URL=%(db)s pod_name=%(pod)s "
+ "version=%(v)s scenario=%(s)s criteria=%(c)s details=%(d)s" % {
+ 'db': TEST_DB_URL,
+ 'pod': pod_name,
+ 'v': version,
+ 's': scenario,
+ 'c': status,
+ 'b': build_tag,
+ 'd': details,
+ })
+ functest_utils.push_results_to_db("domino",
+ "domino-multinode",
+ logger,
+ start_time,
+ stop_time,
+ status,
+ details)
+
+if __name__ == '__main__':
+ main()
href='#n421'>421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587
tiers:
    -
        name: healthcheck
        order: 0
        ci_loop: '(daily)|(weekly)'
        description : >-
            First tier to be executed to verify the basic
            operations in the VIM.
        testcases:
            -
                case_name: connection_check
                project_name: functest
                criteria: 100
                blocking: true
                description: >-
                    This test case verifies the retrieval of OpenStack clients:
                    Keystone, Glance, Neutron and Nova and may perform some
                    simple queries. When the config value of
                    snaps.use_keystone is True, functest must have access to
                    the cloud's private network.
                dependencies:
                    installer: '^((?!netvirt).)*$'
                    scenario: ''
                run:
                    module: 'functest.opnfv_tests.openstack.snaps.connection_check'
                    class: 'ConnectionCheck'

            -
                case_name: api_check
                project_name: functest
                criteria: 100
                blocking: true
                description: >-
                    This test case verifies the retrieval of OpenStack clients:
                    Keystone, Glance, Neutron and Nova and may perform some
                    simple queries. When the config value of
                    snaps.use_keystone is True, functest must have access to
                    the cloud's private network.
                dependencies:
                    installer: '^((?!netvirt).)*$'
                    scenario: ''
                run:
                    module: 'functest.opnfv_tests.openstack.snaps.api_check'
                    class: 'ApiCheck'

            -
                case_name: snaps_health_check
                project_name: functest
                criteria: 100
                blocking: true
                description: >-
                    This test case creates executes the SimpleHealthCheck
                    Python test class which creates an, image, flavor, network,
                    and Cirros VM instance and observes the console output to
                    validate the single port obtains the correct IP address.
                dependencies:
                    installer: ''
                    scenario: '^((?!lxd).)*$'
                run:
                    module: 'functest.opnfv_tests.openstack.snaps.health_check'
                    class: 'HealthCheck'

    -
        name: smoke
        order: 1
        ci_loop: '(daily)|(weekly)'
        description : >-
            Set of basic Functional tests to validate the OPNFV scenarios.
        testcases:
            -
                case_name: vping_ssh
                project_name: functest
                criteria: 100
                blocking: true
                description: >-
                    This test case verifies: 1) SSH to an instance using floating
                    IPs over the public network. 2) Connectivity between 2 instances
                    over a private network.
                dependencies:
                    installer: ''
                    scenario: '^((?!odl_l3|odl-bgpvpn|gluon).)*$'
                run:
                    module: 'functest.opnfv_tests.openstack.vping.vping_ssh'
                    class: 'VPingSSH'

            -
                case_name: vping_userdata
                project_name: functest
                criteria: 100
                blocking: true
                description: >-
                    This test case verifies:  1) Boot a VM with given userdata.
                    2) Connectivity between 2 instances over a private network.
                dependencies:
                    installer: ''
                    scenario: '^((?!lxd).)*$'
                run:
                    module: 'functest.opnfv_tests.openstack.vping.vping_userdata'
                    class: 'VPingUserdata'

            -
                case_name: tempest_smoke_serial
                project_name: functest
                criteria: 100
                blocking: false
                description: >-
                    This test case runs the smoke subset of the OpenStack
                    Tempest suite. The list of test cases is generated by
                    Tempest automatically and depends on the parameters of
                    the OpenStack deplopyment.
                dependencies:
                    installer: '^((?!netvirt).)*$'
                    scenario: ''
                run:
                    module: 'functest.opnfv_tests.openstack.tempest.tempest'
                    class: 'TempestSmokeSerial'

            -
                case_name: rally_sanity
                project_name: functest
                criteria: 100
                blocking: false
                description: >-
                    This test case runs a sub group of tests of the OpenStack
                    Rally suite in smoke mode.
                dependencies:
                    installer: ''
                    scenario: ''
                run:
                    module: 'functest.opnfv_tests.openstack.rally.rally'
                    class: 'RallySanity'

            -
                case_name: refstack_defcore
                project_name: functest
                criteria: 100
                blocking: false
                description: >-
                    This test case runs a sub group of tests of the OpenStack
                    Defcore testcases by using refstack client.
                dependencies:
                    installer: ''
                    scenario: ''
                run:
                    module: 'functest.opnfv_tests.openstack.refstack_client.refstack_client'
                    class: 'RefstackClient'

            -
                case_name: odl
                project_name: functest
                criteria: 100
                blocking: true
                description: >-
                    Test Suite for the OpenDaylight SDN Controller. It
                    integrates some test suites from upstream using
                    Robot as the test framework.
                dependencies:
                    installer: ''
                    scenario: 'odl'
                run:
                    module: 'functest.opnfv_tests.sdn.odl.odl'
                    class: 'ODLTests'
                    args:
                        suites:
                            -  /src/odl_test/csit/suites/integration/basic
                            -  /src/odl_test/csit/suites/openstack/neutron

            -
                case_name: odl_netvirt
                project_name: functest
                criteria: 100
                blocking: false
                description: >-
                    Test Suite for the OpenDaylight SDN Controller when
                    the NetVirt features are installed. It integrates
                    some test suites from upstream using Robot as the
                    test framework.
                dependencies:
                    installer: 'apex'
                    scenario: 'os-odl_l3-nofeature'
                run:
                    module: 'functest.opnfv_tests.sdn.odl.odl'
                    class: 'ODLTests'
                    args:
                        suites:
                            -  /src/odl_test/csit/suites/integration/basic
                            -  /src/odl_test/csit/suites/openstack/neutron
                            -  /src/odl_test/csit/suites/openstack/connectivity

            -
                case_name: fds
                project_name: functest
                criteria: 100
                blocking: false
                description: >-
                    Test Suite for the OpenDaylight SDN Controller when GBP features are
                    installed. It integrates some test suites from upstream using
                    Robot as the test framework.
                dependencies:
                    installer: 'apex'
                    scenario: 'odl.*-fdio'
                run:
                    module: 'functest.opnfv_tests.sdn.odl.odl'
                    class: 'ODLTests'
                    args:
                        suites:
                            -  /src/fds/testing/robot

            -
                case_name: onos
                project_name: functest
                criteria: 100
                blocking: true
                description: >-
                    Test Suite for the ONOS SDN Controller. It integrates
                    some test suites from upstream using TestON as the test
                    framework.
                dependencies:
                    installer: ''
                    scenario: 'onos'
                run:
                    module: 'functest.opnfv_tests.sdn.onos.onos'
                    class: 'Onos'

            -
                case_name: snaps_smoke
                project_name: functest
                criteria: 100
                blocking: false
                description: >-
                    This test case contains tests that setup and destroy
                    environments with VMs with and without Floating IPs
                    with a newly created user and project. Set the config
                    value snaps.use_floating_ips (True|False) to toggle
                    this functionality. When the config value of
                    snaps.use_keystone is True, functest must have access to
                    the cloud's private network.

                dependencies:
                    installer: '^((?!netvirt).)*$'
                    scenario: '^((?!lxd).)*$'
                run:
                    module: 'functest.opnfv_tests.openstack.snaps.smoke'
                    class: 'SnapsSmoke'

    -
        name: features
        order: 2
        ci_loop: '(daily)|(weekly)'
        description : >-
            Test suites from feature projects
            integrated in functest
        testcases:
            -
                case_name: promise
                project_name: promise
                criteria: 100
                blocking: false
                description: >-
                    Test suite from Promise project.
                dependencies:
                    installer: '(fuel)|(joid)'
                    scenario: ''
                run:
                    module: 'functest.core.feature'
                    class: 'BashFeature'
                    args:
                        cmd: 'cd /home/opnfv/repos/promise/promise/test/functest && python ./run_tests.py'

            -
                case_name: doctor-notification
                project_name: doctor
                criteria: 100
                blocking: false
                description: >-
                    Test suite from Doctor project.
                dependencies:
                    installer: '(apex)|(fuel)'
                    scenario: '^((?!fdio).)*$'
                run:
                    module: 'functest.core.feature'
                    class: 'BashFeature'
                    args:
                        cmd: 'cd /home/opnfv/repos/doctor/tests && ./run.sh'

            -
                case_name: bgpvpn
                project_name: sdnvpn
                criteria: 100
                blocking: false
                description: >-
                    Test suite from SDNVPN project.
                dependencies:
                    installer: '(fuel)|(apex)|(netvirt)'
                    scenario: 'bgpvpn'
                run:
                    module: 'functest.core.feature'
                    class: 'BashFeature'
                    args:
                        cmd: 'run_sdnvpn_tests.py'

            -
                case_name: security_scan
                enabled: false
                project_name: securityscanning
                criteria: 100
                blocking: false
                description: >-
                    Simple Security Scan
                dependencies:
                    installer: 'apex'
                    scenario: '^((?!fdio).)*$'
                run:
                    module: 'functest.core.feature'
                    class: 'BashFeature'
                    args:
                        cmd: '. /home/opnfv/functest/conf/stackrc && security_scan --config /usr/local/etc/securityscanning/config.ini'

            -
                case_name: copper
                enabled: false
                project_name: copper
                criteria: 100
                blocking: false
                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 /src/copper/tests && bash run.sh && cd -'

            -
                case_name: multisite
                enabled: false
                project_name: multisite
                criteria: 100
                blocking: false
                description: >-
                    Test suite from kingbird
                dependencies:
                    installer: '(fuel)|(compass)'
                    scenario: 'multisite'
                run:
                    module: 'functest.opnfv_tests.openstack.tempest.tempest'
                    class: 'TempestMultisite'

            -
                case_name: functest-odl-sfc
                enabled: false
                project_name: sfc
                criteria: 100
                blocking: false
                description: >-
                    Test suite for odl-sfc to test two chains and two SFs
                dependencies:
                    installer: '(apex)|(fuel)'
                    scenario: 'odl_l2-sfc'
                run:
                    module: 'functest.core.feature'
                    class: 'BashFeature'
                    args:
                        cmd: 'run_sfc_tests.py'

            -
                case_name: onos_sfc
                enabled: false
                project_name: functest
                criteria: 100
                blocking: true
                description: >-
                    Test Suite for onos-sfc to test sfc function.
                dependencies:
                    installer: ''
                    scenario: 'onos-sfc'
                run:
                    module: 'functest.opnfv_tests.sdn.onos.onos'
                    class: 'OnosSfc'

            -
                case_name: parser-basics
                project_name: parser
                criteria: 100
                blocking: false
                description: >-
                    Test suite from Parser project.
                dependencies:
                    installer: 'fuel'
                    scenario: '^((?!bgpvpn|noha).)*$'
                run:
                    module: 'functest.core.feature'
                    class: 'BashFeature'
                    args:
                        cmd: 'cd /home/opnfv/repos/parser/tests && ./functest_run.sh'

            -
                case_name: domino-multinode
                enabled: false
                project_name: domino
                criteria: 100
                blocking: false
                description: >-
                    Test suite from Domino project.
                dependencies:
                    installer: ''
                    scenario: ''
                run:
                    module: 'functest.core.feature'
                    class: 'BashFeature'
                    args:
                        cmd: 'cd /src/domino && ./tests/run_multinode.sh'

            -
                case_name: gluon_vping
                enabled: false
                project_name: netready
                criteria: 100
                blocking: false
                description: >-
                    Test suite from Netready project.
                dependencies:
                    installer: 'apex'
                    scenario: 'gluon'
                run:
                    module: 'functest.core.feature'
                    class: 'BashFeature'
                    args:
                        cmd: 'cd /home/opnfv/repos/netready/test/functest && python ./gluon-test-suite.py'

            -
                case_name: barometercollectd
                enabled: false
                project_name: barometer
                criteria: 100
                blocking: false
                description: >-
                    Test suite for the Barometer project. Separate tests verify the
                    proper configuration and functionality of the following
                    collectd plugins Ceilometer, Hugepages, Memory RAS (mcelog),
                    and OVS Events
                dependencies:
                    installer: 'fuel'
                    scenario: 'kvm_ovs_dpdk_bar'
                run:
                     module: 'baro_tests.barometer'
                     class: 'BarometerCollectd'

    -
        name: components
        order: 3
        ci_loop: 'weekly'
        description : >-
            Extensive testing of OpenStack API.
        testcases:
            -
                case_name: tempest_full_parallel
                project_name: functest
                criteria: 80
                blocking: false
                description: >-
                    The list of test cases is generated by
                    Tempest automatically and depends on the parameters of
                    the OpenStack deplopyment.
                dependencies:
                    installer: '^((?!netvirt).)*$'
                    scenario: ''
                run:
                    module: 'functest.opnfv_tests.openstack.tempest.tempest'
                    class: 'TempestFullParallel'

            -
                case_name: tempest_custom
                project_name: functest
                criteria: 100
                blocking: false
                description: >-
                    The test case allows running a customized list of tempest
                    test cases defined in a file under
                    <dir_functest_repo>/functest/opnfv_tests/openstack/
                      /tempest/custom_tests/test_list.txt
                    The file is empty and can be customized with the desired tests.
                dependencies:
                    installer: 'unknown'
                    scenario: 'unknown'
                run:
                    module: 'functest.opnfv_tests.openstack.tempest.tempest'
                    class: 'TempestCustom'

            -
                case_name: rally_full
                project_name: functest
                criteria: 90
                blocking: false
                description: >-
                    This test case runs the full suite of scenarios of the OpenStack
                    Rally suite using several threads and iterations.
                dependencies:
                    installer: '^((?!netvirt).)*$'
                    scenario: ''
                run:
                    module: 'functest.opnfv_tests.openstack.rally.rally'
                    class: 'RallyFull'

    -
        name: vnf
        order: 4
        ci_loop: 'daily'
        description : >-
            Collection of VNF test cases.
        testcases:
            -
                case_name: cloudify_ims
                project_name: functest
                criteria: 100
                blocking: false
                description: >-
                    This test case deploys an OpenSource vIMS solution from Clearwater
                    using the Cloudify orchestrator. It also runs some signaling traffic.
                dependencies:
                    installer: ''
                    scenario: 'os-nosdn-nofeature-ha'
                run:
                    module: 'functest.opnfv_tests.vnf.ims.cloudify_ims'
                    class: 'CloudifyIms'

            -
                case_name: aaa
                enabled: false
                project_name: functest
                criteria: 100
                blocking: false
                description: >-
                   Test suite from Parser project.
                dependencies:
                    installer: ''
                    scenario: ''
                run:
                    module: 'functest.opnfv_tests.vnf.aaa.aaa'
                    class: 'AaaVnf'

            -
                case_name: orchestra_ims
                enabled: true
                project_name: functest
                criteria: 100
                blocking: false
                description: >-
                    VNF deployment with OpenBaton (Orchestra)
                dependencies:
                    installer: ''
                    scenario: 'os-nosdn-nofeature-ha'
                run:
                    module: 'functest.opnfv_tests.vnf.ims.orchestra_ims'
                    class: 'ImsVnf'

            -
                case_name: opera_vims
                enabled: false
                project_name: opera
                criteria: 100
                blocking: false
                description: >-
                    VNF deployment with OPEN-O
                dependencies:
                    installer: 'compass'
                    scenario: 'os-nosdn-openo-ha'
                run:
                    module: 'functest.opnfv_tests.vnf.ims.opera_ims'
                    class: 'OperaIms'

            -
                case_name: vyos_vrouter
                enabled: false
                project_name: functest
                criteria: 100
                blocking: false
                description: >-
                    This test case is vRouter testing.
                dependencies:
                    installer: 'fuel'
                    scenario: 'nosdn-nofeature'
                run:
                    module: 'functest.opnfv_tests.vnf.router.vyos_vrouter'
                    class: 'VrouterVnf'