From 107e61635c2ab1feb5263380ea63e21cf2e6e65b Mon Sep 17 00:00:00 2001 From: Morgan Richomme Date: Tue, 8 Nov 2016 14:18:12 +0100 Subject: [PATCH] Repo structure modification - create functest subdirectory - rename unit tests - adapt path in exec and config files JIRA: FUNCTEST-525 Change-Id: Ifd5c6edfb5bda1b09f82848e2269ad5fbeb84d0a Signed-off-by: Morgan Richomme --- ci/config_functest.yaml | 14 ++++---- ci/exec_test.sh | 41 +++++++++++----------- ci/testcases.yaml | 2 +- docker/Dockerfile | 2 +- __init__.py => functest/__init__.py | 0 {cli => functest/cli}/__init__.py | 0 {cli => functest/cli}/cli_base.py | 0 {cli => functest/cli}/commands/__init__.py | 0 {cli => functest/cli}/commands/cli_env.py | 0 {cli => functest/cli}/commands/cli_os.py | 0 {cli => functest/cli}/commands/cli_testcase.py | 0 {cli => functest/cli}/commands/cli_tier.py | 0 {cli => functest/cli}/functest-complete.sh | 0 {cli => functest/cli}/setup.py | 0 {core => functest/core}/TestCasesBase.py | 0 {core => functest/core}/__init__.py | 0 .../Controllers/ODL/OpenDaylightTesting.py | 0 .../opnfv_tests}/Controllers/ODL/__init__.py | 0 .../opnfv_tests}/Controllers/ONOS/Sfc/README.md | 0 .../opnfv_tests}/Controllers/ONOS/Sfc/Sfc.py | 0 .../opnfv_tests}/Controllers/ONOS/Sfc/Sfc_fun.py | 0 .../Controllers/ONOS/Teston/Readme.txt | 0 .../Controllers/ONOS/Teston/__init__.py | 0 .../Controllers/ONOS/Teston/adapters/__init__.py | 0 .../Controllers/ONOS/Teston/adapters/client.py | 0 .../Controllers/ONOS/Teston/adapters/connection.py | 0 .../ONOS/Teston/adapters/environment.py | 0 .../Controllers/ONOS/Teston/adapters/foundation.py | 4 +-- .../Controllers/ONOS/Teston/dependencies/onos | 0 .../Controllers/ONOS/Teston/log/gitignore | 0 .../Controllers/ONOS/Teston/onosfunctest.py | 0 .../opnfv_tests}/Controllers/__init__.py | 0 .../OpenStack/examples/create_instance_and_ip.py | 0 .../OpenStack/healthcheck/healthcheck.sh | 0 .../opnfv_tests}/OpenStack/rally/blacklist.txt | 0 .../opnfv_tests}/OpenStack/rally/macro/macro.yaml | 0 .../opnfv_tests}/OpenStack/rally/run_rally-cert.py | 0 .../rally/scenario/full/opnfv-cinder.yaml | 0 .../OpenStack/rally/scenario/full/opnfv-heat.yaml | 0 .../rally/scenario/full/opnfv-neutron.yaml | 0 .../OpenStack/rally/scenario/full/opnfv-nova.yaml | 0 .../rally/scenario/opnfv-authenticate.yaml | 0 .../OpenStack/rally/scenario/opnfv-glance.yaml | 0 .../OpenStack/rally/scenario/opnfv-keystone.yaml | 0 .../OpenStack/rally/scenario/opnfv-quotas.yaml | 0 .../OpenStack/rally/scenario/opnfv-requests.yaml | 0 .../OpenStack/rally/scenario/opnfv-vm.yaml | 0 .../rally/scenario/sanity/opnfv-cinder.yaml | 0 .../rally/scenario/sanity/opnfv-heat.yaml | 0 .../rally/scenario/sanity/opnfv-neutron.yaml | 0 .../rally/scenario/sanity/opnfv-nova.yaml | 0 .../rally/scenario/support/instance_dd_test.sh | 0 .../templates/autoscaling_policy.yaml.template | 0 .../rally/scenario/templates/default.yaml.template | 0 .../templates/random_strings.yaml.template | 0 .../templates/resource_group.yaml.template | 0 .../templates/server_with_ports.yaml.template | 0 .../templates/server_with_volume.yaml.template | 0 ...pdated_autoscaling_policy_inplace.yaml.template | 0 .../updated_random_strings_add.yaml.template | 0 .../updated_random_strings_delete.yaml.template | 0 .../updated_random_strings_replace.yaml.template | 0 .../updated_resource_group_increase.yaml.template | 0 .../updated_resource_group_reduce.yaml.template | 0 .../opnfv_tests}/OpenStack/rally/task.yaml | 0 .../OpenStack/tempest/custom_tests/blacklist.txt | 0 .../OpenStack/tempest/custom_tests/defcore_req.txt | 0 .../OpenStack/tempest/gen_tempest_conf.py | 0 .../opnfv_tests}/OpenStack/tempest/run_tempest.py | 0 .../opnfv_tests}/OpenStack/vPing/ping.sh | 0 .../opnfv_tests}/OpenStack/vPing/vping.py | 0 .../opnfv_tests}/OpenStack/vPing/vping_util.py | 2 +- {testcases => functest/opnfv_tests}/__init__.py | 0 .../opnfv_tests}/features/copper.py | 0 .../opnfv_tests}/features/doctor.py | 0 .../opnfv_tests}/features/domino.py | 0 .../opnfv_tests}/features/multisite.py | 0 .../opnfv_tests}/features/promise.py | 0 .../opnfv_tests}/features/sfc/SSHUtils.py | 0 .../features/sfc/compute_presetup_CI.bash | 0 .../features/sfc/correct_classifier.bash | 0 .../opnfv_tests}/features/sfc/delete.sh | 0 .../opnfv_tests}/features/sfc/ovs_utils.py | 0 .../opnfv_tests}/features/sfc/prepare_odl_sfc.bash | 2 +- .../opnfv_tests}/features/sfc/prepare_odl_sfc.py | 2 +- .../features/sfc/server_presetup_CI.bash | 0 .../opnfv_tests}/features/sfc/sfc.py | 2 +- .../features/sfc/sfc_change_classi.bash | 0 .../opnfv_tests}/features/sfc/sfc_colorado1.py | 6 ++-- .../opnfv_tests}/features/sfc/sfc_tacker.bash | 0 .../features/sfc/tacker_client_install.sh | 0 .../opnfv_tests}/features/sfc/test-vnfd1.yaml | 0 .../opnfv_tests}/features/sfc/test-vnfd2.yaml | 0 .../opnfv_tests}/security_scan/config.ini | 0 .../opnfv_tests}/security_scan/connect.py | 0 .../examples/xccdf-rhel7-server-upstream.ini | 0 .../security_scan/examples/xccdf-standard.ini | 0 .../security_scan/scripts/createfiles.py | 0 .../security_scan/scripts/internet_check.py | 0 .../opnfv_tests}/security_scan/security_scan.py | 2 +- .../opnfv_tests}/vnf/vIMS/clearwater.py | 0 .../opnfv_tests}/vnf/vIMS/create_venv.sh | 0 .../opnfv_tests}/vnf/vIMS/orchestrator.py | 0 .../opnfv_tests}/vnf/vIMS/requirements.pip | 0 .../opnfv_tests}/vnf/vIMS/vIMS.py | 0 .../opnfv_tests}/vnf/vRNC/parser.py | 0 {unit_tests => functest/tests}/__init__.py | 0 .../core => functest/tests/unit}/__init__.py | 0 .../odl => functest/tests/unit/core}/__init__.py | 0 .../tests/unit}/core/test_base.py | 0 {utils => functest/tests/unit/odl}/__init__.py | 0 .../tests/unit}/odl/test_odl.py | 2 +- functest/tests/unit/utils/__init__.py | 0 functest/tests/unit/utils/test_utils.py | 29 +++++++++++++++ functest/utils/__init__.py | 0 {utils => functest/utils}/functest_logger.py | 0 {utils => functest/utils}/functest_utils.py | 0 {utils => functest/utils}/functest_vacation.py | 0 {utils => functest/utils}/openstack_clean.py | 0 {utils => functest/utils}/openstack_snapshot.py | 0 {utils => functest/utils}/openstack_tacker.py | 0 {utils => functest/utils}/openstack_utils.py | 0 run_unit_tests.sh | 25 +------------ 123 files changed, 71 insertions(+), 64 deletions(-) rename __init__.py => functest/__init__.py (100%) rename {cli => functest/cli}/__init__.py (100%) rename {cli => functest/cli}/cli_base.py (100%) rename {cli => functest/cli}/commands/__init__.py (100%) rename {cli => functest/cli}/commands/cli_env.py (100%) rename {cli => functest/cli}/commands/cli_os.py (100%) rename {cli => functest/cli}/commands/cli_testcase.py (100%) rename {cli => functest/cli}/commands/cli_tier.py (100%) rename {cli => functest/cli}/functest-complete.sh (100%) rename {cli => functest/cli}/setup.py (100%) rename {core => functest/core}/TestCasesBase.py (100%) rename {core => functest/core}/__init__.py (100%) rename {testcases => functest/opnfv_tests}/Controllers/ODL/OpenDaylightTesting.py (100%) rename {testcases => functest/opnfv_tests}/Controllers/ODL/__init__.py (100%) rename {testcases => functest/opnfv_tests}/Controllers/ONOS/Sfc/README.md (100%) rename {testcases => functest/opnfv_tests}/Controllers/ONOS/Sfc/Sfc.py (100%) rename {testcases => functest/opnfv_tests}/Controllers/ONOS/Sfc/Sfc_fun.py (100%) rename {testcases => functest/opnfv_tests}/Controllers/ONOS/Teston/Readme.txt (100%) rename {testcases => functest/opnfv_tests}/Controllers/ONOS/Teston/__init__.py (100%) rename {testcases => functest/opnfv_tests}/Controllers/ONOS/Teston/adapters/__init__.py (100%) rename {testcases => functest/opnfv_tests}/Controllers/ONOS/Teston/adapters/client.py (100%) rename {testcases => functest/opnfv_tests}/Controllers/ONOS/Teston/adapters/connection.py (100%) rename {testcases => functest/opnfv_tests}/Controllers/ONOS/Teston/adapters/environment.py (100%) rename {testcases => functest/opnfv_tests}/Controllers/ONOS/Teston/adapters/foundation.py (96%) rename {testcases => functest/opnfv_tests}/Controllers/ONOS/Teston/dependencies/onos (100%) rename {testcases => functest/opnfv_tests}/Controllers/ONOS/Teston/log/gitignore (100%) rename {testcases => functest/opnfv_tests}/Controllers/ONOS/Teston/onosfunctest.py (100%) rename {testcases => functest/opnfv_tests}/Controllers/__init__.py (100%) rename {testcases => functest/opnfv_tests}/OpenStack/examples/create_instance_and_ip.py (100%) rename {testcases => functest/opnfv_tests}/OpenStack/healthcheck/healthcheck.sh (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/blacklist.txt (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/macro/macro.yaml (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/run_rally-cert.py (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/full/opnfv-cinder.yaml (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/full/opnfv-heat.yaml (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/full/opnfv-neutron.yaml (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/full/opnfv-nova.yaml (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/opnfv-authenticate.yaml (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/opnfv-glance.yaml (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/opnfv-keystone.yaml (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/opnfv-quotas.yaml (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/opnfv-requests.yaml (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/opnfv-vm.yaml (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/sanity/opnfv-cinder.yaml (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/sanity/opnfv-heat.yaml (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/sanity/opnfv-neutron.yaml (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/sanity/opnfv-nova.yaml (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/support/instance_dd_test.sh (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/templates/autoscaling_policy.yaml.template (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/templates/default.yaml.template (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/templates/random_strings.yaml.template (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/templates/resource_group.yaml.template (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/templates/server_with_ports.yaml.template (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/templates/server_with_volume.yaml.template (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/templates/updated_autoscaling_policy_inplace.yaml.template (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/templates/updated_random_strings_add.yaml.template (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/templates/updated_random_strings_delete.yaml.template (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/templates/updated_random_strings_replace.yaml.template (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/templates/updated_resource_group_increase.yaml.template (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/scenario/templates/updated_resource_group_reduce.yaml.template (100%) rename {testcases => functest/opnfv_tests}/OpenStack/rally/task.yaml (100%) rename {testcases => functest/opnfv_tests}/OpenStack/tempest/custom_tests/blacklist.txt (100%) rename {testcases => functest/opnfv_tests}/OpenStack/tempest/custom_tests/defcore_req.txt (100%) rename {testcases => functest/opnfv_tests}/OpenStack/tempest/gen_tempest_conf.py (100%) rename {testcases => functest/opnfv_tests}/OpenStack/tempest/run_tempest.py (100%) rename {testcases => functest/opnfv_tests}/OpenStack/vPing/ping.sh (100%) rename {testcases => functest/opnfv_tests}/OpenStack/vPing/vping.py (100%) rename {testcases => functest/opnfv_tests}/OpenStack/vPing/vping_util.py (99%) rename {testcases => functest/opnfv_tests}/__init__.py (100%) rename {testcases => functest/opnfv_tests}/features/copper.py (100%) rename {testcases => functest/opnfv_tests}/features/doctor.py (100%) rename {testcases => functest/opnfv_tests}/features/domino.py (100%) rename {testcases => functest/opnfv_tests}/features/multisite.py (100%) rename {testcases => functest/opnfv_tests}/features/promise.py (100%) rename {testcases => functest/opnfv_tests}/features/sfc/SSHUtils.py (100%) rename {testcases => functest/opnfv_tests}/features/sfc/compute_presetup_CI.bash (100%) rename {testcases => functest/opnfv_tests}/features/sfc/correct_classifier.bash (100%) rename {testcases => functest/opnfv_tests}/features/sfc/delete.sh (100%) rename {testcases => functest/opnfv_tests}/features/sfc/ovs_utils.py (100%) rename {testcases => functest/opnfv_tests}/features/sfc/prepare_odl_sfc.bash (94%) rename {testcases => functest/opnfv_tests}/features/sfc/prepare_odl_sfc.py (97%) rename {testcases => functest/opnfv_tests}/features/sfc/server_presetup_CI.bash (100%) rename {testcases => functest/opnfv_tests}/features/sfc/sfc.py (99%) rename {testcases => functest/opnfv_tests}/features/sfc/sfc_change_classi.bash (100%) rename {testcases => functest/opnfv_tests}/features/sfc/sfc_colorado1.py (99%) rename {testcases => functest/opnfv_tests}/features/sfc/sfc_tacker.bash (100%) rename {testcases => functest/opnfv_tests}/features/sfc/tacker_client_install.sh (100%) rename {testcases => functest/opnfv_tests}/features/sfc/test-vnfd1.yaml (100%) rename {testcases => functest/opnfv_tests}/features/sfc/test-vnfd2.yaml (100%) rename {testcases => functest/opnfv_tests}/security_scan/config.ini (100%) rename {testcases => functest/opnfv_tests}/security_scan/connect.py (100%) rename {testcases => functest/opnfv_tests}/security_scan/examples/xccdf-rhel7-server-upstream.ini (100%) rename {testcases => functest/opnfv_tests}/security_scan/examples/xccdf-standard.ini (100%) rename {testcases => functest/opnfv_tests}/security_scan/scripts/createfiles.py (100%) rename {testcases => functest/opnfv_tests}/security_scan/scripts/internet_check.py (100%) rename {testcases => functest/opnfv_tests}/security_scan/security_scan.py (99%) rename {testcases => functest/opnfv_tests}/vnf/vIMS/clearwater.py (100%) rename {testcases => functest/opnfv_tests}/vnf/vIMS/create_venv.sh (100%) rename {testcases => functest/opnfv_tests}/vnf/vIMS/orchestrator.py (100%) rename {testcases => functest/opnfv_tests}/vnf/vIMS/requirements.pip (100%) rename {testcases => functest/opnfv_tests}/vnf/vIMS/vIMS.py (100%) rename {testcases => functest/opnfv_tests}/vnf/vRNC/parser.py (100%) rename {unit_tests => functest/tests}/__init__.py (100%) rename {unit_tests/core => functest/tests/unit}/__init__.py (100%) rename {unit_tests/odl => functest/tests/unit/core}/__init__.py (100%) rename {unit_tests => functest/tests/unit}/core/test_base.py (100%) rename {utils => functest/tests/unit/odl}/__init__.py (100%) rename {unit_tests => functest/tests/unit}/odl/test_odl.py (99%) create mode 100644 functest/tests/unit/utils/__init__.py create mode 100644 functest/tests/unit/utils/test_utils.py create mode 100644 functest/utils/__init__.py rename {utils => functest/utils}/functest_logger.py (100%) rename {utils => functest/utils}/functest_utils.py (100%) rename {utils => functest/utils}/functest_vacation.py (100%) rename {utils => functest/utils}/openstack_clean.py (100%) rename {utils => functest/utils}/openstack_snapshot.py (100%) rename {utils => functest/utils}/openstack_tacker.py (100%) rename {utils => functest/utils}/openstack_utils.py (100%) diff --git a/ci/config_functest.yaml b/ci/config_functest.yaml index d6497678a..cca4959a9 100644 --- a/ci/config_functest.yaml +++ b/ci/config_functest.yaml @@ -1,13 +1,13 @@ general: directories: # Relative to the path where the repo is cloned: - dir_vping: testcases/OpenStack/vPing/ - dir_odl: testcases/Controllers/ODL/ - dir_rally: testcases/OpenStack/rally/ - dir_tempest_cases: testcases/OpenStack/tempest/custom_tests/ - dir_vIMS: testcases/vnf/vIMS/ - dir_onos: testcases/Controllers/ONOS/Teston/ - dir_onos_sfc: testcases/Controllers/ONOS/Sfc/ + dir_vping: functest/opnfv_tests/OpenStack/vPing/ + dir_odl: functest/opnfv_tests/Controllers/ODL/ + dir_rally: functest/opnfv_tests/OpenStack/rally/ + dir_tempest_cases: functest/opnfv_tests/OpenStack/tempest/custom_tests/ + dir_vIMS: functest/opnfv_tests/vnf/vIMS/ + dir_onos: functest/opnfv_tests/Controllers/ONOS/Teston/ + dir_onos_sfc: functest/opnfv_tests/Controllers/ONOS/Sfc/ # Absolute path dir_repos: /home/opnfv/repos diff --git a/ci/exec_test.sh b/ci/exec_test.sh index 6fdc42666..640180059 100755 --- a/ci/exec_test.sh +++ b/ci/exec_test.sh @@ -37,6 +37,7 @@ if [[ "${CI_DEBUG,,}" == "true" ]];then fi FUNCTEST_REPO_DIR=${repos_dir}/functest +FUNCTEST_TEST_DIR=${repos_dir}/functest/functest/opnfv_tests FUNCTEST_CONF_DIR=/home/opnfv/functest/conf export PYTHONUNBUFFERED=1 @@ -81,39 +82,39 @@ function run_test(){ case $test_name in "healthcheck") - ${FUNCTEST_REPO_DIR}/testcases/OpenStack/healthcheck/healthcheck.sh + ${FUNCTEST_TEST_DIR}/OpenStack/healthcheck/healthcheck.sh ;; "vping_ssh") - python ${FUNCTEST_REPO_DIR}/testcases/OpenStack/vPing/vping.py -m ssh $report + python ${FUNCTEST_TEST_DIR}/OpenStack/vPing/vping.py -m ssh $report ;; "vping_userdata") - python ${FUNCTEST_REPO_DIR}/testcases/OpenStack/vPing/vping.py -m userdata $report + python ${FUNCTEST_TEST_DIR}/OpenStack/vPing/vping.py -m userdata $report ;; "odl") odl_tests [[ "$report" == "-r" ]] && args=-p - ${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/OpenDaylightTesting.py \ + ${FUNCTEST_TEST_DIR}/Controllers/ODL/OpenDaylightTesting.py \ --keystoneip $keystone_ip --neutronip $neutron_ip \ --osusername ${OS_USERNAME} --ostenantname ${OS_TENANT_NAME} \ --ospassword ${OS_PASSWORD} \ --odlip $odl_ip --odlwebport $odl_port ${args} ;; "tempest_smoke_serial") - python ${FUNCTEST_REPO_DIR}/testcases/OpenStack/tempest/run_tempest.py \ + python ${FUNCTEST_TEST_DIR}/OpenStack/tempest/run_tempest.py \ $clean_flag -s -m smoke $report ;; "tempest_full_parallel") - python ${FUNCTEST_REPO_DIR}/testcases/OpenStack/tempest/run_tempest.py \ + python ${FUNCTEST_TEST_DIR}/OpenStack/tempest/run_tempest.py \ $serial_flag $clean_flag -m full $report ;; "vims") - python ${FUNCTEST_REPO_DIR}/testcases/vnf/vIMS/vIMS.py $clean_flag $report + python ${FUNCTEST_TEST_DIR}/vnf/vIMS/vIMS.py $clean_flag $report ;; "rally_full") - python ${FUNCTEST_REPO_DIR}/testcases/OpenStack/rally/run_rally-cert.py $clean_flag all $report + python ${FUNCTEST_TEST_DIR}/OpenStack/rally/run_rally-cert.py $clean_flag all $report ;; "rally_sanity") - python ${FUNCTEST_REPO_DIR}/testcases/OpenStack/rally/run_rally-cert.py \ + python ${FUNCTEST_TEST_DIR}/OpenStack/rally/run_rally-cert.py \ $clean_flag --sanity all $report ;; "bgpvpn") @@ -121,17 +122,17 @@ function run_test(){ python ${sdnvpn_repo_dir}/run_tests.py $report ;; "onos") - python ${FUNCTEST_REPO_DIR}/testcases/Controllers/ONOS/Teston/onosfunctest.py + python ${FUNCTEST_TEST_DIR}/Controllers/ONOS/Teston/onosfunctest.py ;; "onos_sfc") - python ${FUNCTEST_REPO_DIR}/testcases/Controllers/ONOS/Teston/onosfunctest.py -t sfc + python ${FUNCTEST_TEST_DIR}/Controllers/ONOS/Teston/onosfunctest.py -t sfc ;; "promise") - python ${FUNCTEST_REPO_DIR}/testcases/features/promise.py $report + python ${FUNCTEST_TEST_DIR}/features/promise.py $report sleep 10 # to let the instances terminate ;; "doctor") - python ${FUNCTEST_REPO_DIR}/testcases/features/doctor.py $report + python ${FUNCTEST_TEST_DIR}/features/doctor.py $report ;; "ovno") # suite under rewritting for colorado @@ -144,29 +145,29 @@ function run_test(){ python ${repos_dir}/securityscanning/security_scan.py --config ${repos_dir}/securityscanning/config.ini ;; "copper") - python ${FUNCTEST_REPO_DIR}/testcases/features/copper.py $report + python ${FUNCTEST_TEST_DIR}/features/copper.py $report ;; "moon") python ${repos_dir}/moon/tests/run_tests.py $report ;; "multisite") - python ${FUNCTEST_REPO_DIR}/testcases/OpenStack/tempest/gen_tempest_conf.py - python ${FUNCTEST_REPO_DIR}/testcases/OpenStack/tempest/run_tempest.py \ + python ${FUNCTEST_TEST_DIR}/OpenStack/tempest/gen_tempest_conf.py + python ${FUNCTEST_TEST_DIR}/OpenStack/tempest/run_tempest.py \ $clean_flag -s -m feature_multisite $report \ - -c ${FUNCTEST_REPO_DIR}/testcases/OpenStack/tempest/tempest_multisite.conf + -c ${FUNCTEST_TEST_DIR}/OpenStack/tempest/tempest_multisite.conf ;; "domino") - python ${FUNCTEST_REPO_DIR}/testcases/features/domino.py $report + python ${FUNCTEST_TEST_DIR}/features/domino.py $report ;; "odl-sfc") - ODL_SFC_DIR=${FUNCTEST_REPO_DIR}/testcases/features/sfc + ODL_SFC_DIR=${FUNCTEST_TEST_DIR}/features/sfc # pass FUNCTEST_REPO_DIR inside prepare_odl_sfc.bash FUNCTEST_REPO_DIR=${FUNCTEST_REPO_DIR} python ${ODL_SFC_DIR}/prepare_odl_sfc.py || exit $? source ${ODL_SFC_DIR}/tackerc python ${ODL_SFC_DIR}/sfc_colorado1.py $report ;; "parser") - python ${FUNCTEST_REPO_DIR}/testcases/vnf/vRNC/parser.py $report + python ${FUNCTEST_TEST_DIR}/vnf/vRNC/parser.py $report ;; *) echo "The test case '${test_name}' does not exist." diff --git a/ci/testcases.yaml b/ci/testcases.yaml index 22509e611..afd329868 100644 --- a/ci/testcases.yaml +++ b/ci/testcases.yaml @@ -93,7 +93,7 @@ tiers: installer: '' scenario: 'odl' run: - module: 'functest.testcases.Controllers.ODL.OpenDaylightTesting' + module: 'functest.opnfv_tests.Controllers.ODL.OpenDaylightTesting' class: 'ODLTestCases' - diff --git a/docker/Dockerfile b/docker/Dockerfile index 0291c6619..42c24ec0f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -121,7 +121,7 @@ ADD http://205.177.226.237:9999/onosfw/firewall_block_image.img /home/opnfv/func RUN gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 RUN curl -L https://get.rvm.io | bash -s stable -RUN /bin/bash -c ". /home/opnfv/repos/functest/testcases/features/sfc/tacker_client_install.sh" +RUN /bin/bash -c ". /home/opnfv/repos/functest/functest/opnfv_tests/features/sfc/tacker_client_install.sh" RUN cd ${repos_dir}/bgpvpn && pip install . RUN cd ${repos_dir}/kingbird && pip install -e . RUN cd ${repos_dir}/moon/moonclient/ && python setup.py install diff --git a/__init__.py b/functest/__init__.py similarity index 100% rename from __init__.py rename to functest/__init__.py diff --git a/cli/__init__.py b/functest/cli/__init__.py similarity index 100% rename from cli/__init__.py rename to functest/cli/__init__.py diff --git a/cli/cli_base.py b/functest/cli/cli_base.py similarity index 100% rename from cli/cli_base.py rename to functest/cli/cli_base.py diff --git a/cli/commands/__init__.py b/functest/cli/commands/__init__.py similarity index 100% rename from cli/commands/__init__.py rename to functest/cli/commands/__init__.py diff --git a/cli/commands/cli_env.py b/functest/cli/commands/cli_env.py similarity index 100% rename from cli/commands/cli_env.py rename to functest/cli/commands/cli_env.py diff --git a/cli/commands/cli_os.py b/functest/cli/commands/cli_os.py similarity index 100% rename from cli/commands/cli_os.py rename to functest/cli/commands/cli_os.py diff --git a/cli/commands/cli_testcase.py b/functest/cli/commands/cli_testcase.py similarity index 100% rename from cli/commands/cli_testcase.py rename to functest/cli/commands/cli_testcase.py diff --git a/cli/commands/cli_tier.py b/functest/cli/commands/cli_tier.py similarity index 100% rename from cli/commands/cli_tier.py rename to functest/cli/commands/cli_tier.py diff --git a/cli/functest-complete.sh b/functest/cli/functest-complete.sh similarity index 100% rename from cli/functest-complete.sh rename to functest/cli/functest-complete.sh diff --git a/cli/setup.py b/functest/cli/setup.py similarity index 100% rename from cli/setup.py rename to functest/cli/setup.py diff --git a/core/TestCasesBase.py b/functest/core/TestCasesBase.py similarity index 100% rename from core/TestCasesBase.py rename to functest/core/TestCasesBase.py diff --git a/core/__init__.py b/functest/core/__init__.py similarity index 100% rename from core/__init__.py rename to functest/core/__init__.py diff --git a/testcases/Controllers/ODL/OpenDaylightTesting.py b/functest/opnfv_tests/Controllers/ODL/OpenDaylightTesting.py similarity index 100% rename from testcases/Controllers/ODL/OpenDaylightTesting.py rename to functest/opnfv_tests/Controllers/ODL/OpenDaylightTesting.py diff --git a/testcases/Controllers/ODL/__init__.py b/functest/opnfv_tests/Controllers/ODL/__init__.py similarity index 100% rename from testcases/Controllers/ODL/__init__.py rename to functest/opnfv_tests/Controllers/ODL/__init__.py diff --git a/testcases/Controllers/ONOS/Sfc/README.md b/functest/opnfv_tests/Controllers/ONOS/Sfc/README.md similarity index 100% rename from testcases/Controllers/ONOS/Sfc/README.md rename to functest/opnfv_tests/Controllers/ONOS/Sfc/README.md diff --git a/testcases/Controllers/ONOS/Sfc/Sfc.py b/functest/opnfv_tests/Controllers/ONOS/Sfc/Sfc.py similarity index 100% rename from testcases/Controllers/ONOS/Sfc/Sfc.py rename to functest/opnfv_tests/Controllers/ONOS/Sfc/Sfc.py diff --git a/testcases/Controllers/ONOS/Sfc/Sfc_fun.py b/functest/opnfv_tests/Controllers/ONOS/Sfc/Sfc_fun.py similarity index 100% rename from testcases/Controllers/ONOS/Sfc/Sfc_fun.py rename to functest/opnfv_tests/Controllers/ONOS/Sfc/Sfc_fun.py diff --git a/testcases/Controllers/ONOS/Teston/Readme.txt b/functest/opnfv_tests/Controllers/ONOS/Teston/Readme.txt similarity index 100% rename from testcases/Controllers/ONOS/Teston/Readme.txt rename to functest/opnfv_tests/Controllers/ONOS/Teston/Readme.txt diff --git a/testcases/Controllers/ONOS/Teston/__init__.py b/functest/opnfv_tests/Controllers/ONOS/Teston/__init__.py similarity index 100% rename from testcases/Controllers/ONOS/Teston/__init__.py rename to functest/opnfv_tests/Controllers/ONOS/Teston/__init__.py diff --git a/testcases/Controllers/ONOS/Teston/adapters/__init__.py b/functest/opnfv_tests/Controllers/ONOS/Teston/adapters/__init__.py similarity index 100% rename from testcases/Controllers/ONOS/Teston/adapters/__init__.py rename to functest/opnfv_tests/Controllers/ONOS/Teston/adapters/__init__.py diff --git a/testcases/Controllers/ONOS/Teston/adapters/client.py b/functest/opnfv_tests/Controllers/ONOS/Teston/adapters/client.py similarity index 100% rename from testcases/Controllers/ONOS/Teston/adapters/client.py rename to functest/opnfv_tests/Controllers/ONOS/Teston/adapters/client.py diff --git a/testcases/Controllers/ONOS/Teston/adapters/connection.py b/functest/opnfv_tests/Controllers/ONOS/Teston/adapters/connection.py similarity index 100% rename from testcases/Controllers/ONOS/Teston/adapters/connection.py rename to functest/opnfv_tests/Controllers/ONOS/Teston/adapters/connection.py diff --git a/testcases/Controllers/ONOS/Teston/adapters/environment.py b/functest/opnfv_tests/Controllers/ONOS/Teston/adapters/environment.py similarity index 100% rename from testcases/Controllers/ONOS/Teston/adapters/environment.py rename to functest/opnfv_tests/Controllers/ONOS/Teston/adapters/environment.py diff --git a/testcases/Controllers/ONOS/Teston/adapters/foundation.py b/functest/opnfv_tests/Controllers/ONOS/Teston/adapters/foundation.py similarity index 96% rename from testcases/Controllers/ONOS/Teston/adapters/foundation.py rename to functest/opnfv_tests/Controllers/ONOS/Teston/adapters/foundation.py index 5c42c35e8..603e9933c 100644 --- a/testcases/Controllers/ONOS/Teston/adapters/foundation.py +++ b/functest/opnfv_tests/Controllers/ONOS/Teston/adapters/foundation.py @@ -26,10 +26,10 @@ class foundation: # currentpath = os.getcwd() REPO_PATH = ft_utils.FUNCTEST_REPO + '/' - currentpath = REPO_PATH + 'testcases/Controllers/ONOS/Teston/CI' + currentpath = REPO_PATH + 'opnfv_tests/Controllers/ONOS/Teston/CI' self.cipath = currentpath self.logdir = os.path.join(currentpath, 'log') - self.workhome = currentpath[0: currentpath.rfind('testcases') - 1] + self.workhome = currentpath[0: currentpath.rfind('opnfv_tests') - 1] self.Result_DB = '' filename = time.strftime('%Y-%m-%d-%H-%M-%S') + '.log' self.logfilepath = os.path.join(self.logdir, filename) diff --git a/testcases/Controllers/ONOS/Teston/dependencies/onos b/functest/opnfv_tests/Controllers/ONOS/Teston/dependencies/onos similarity index 100% rename from testcases/Controllers/ONOS/Teston/dependencies/onos rename to functest/opnfv_tests/Controllers/ONOS/Teston/dependencies/onos diff --git a/testcases/Controllers/ONOS/Teston/log/gitignore b/functest/opnfv_tests/Controllers/ONOS/Teston/log/gitignore similarity index 100% rename from testcases/Controllers/ONOS/Teston/log/gitignore rename to functest/opnfv_tests/Controllers/ONOS/Teston/log/gitignore diff --git a/testcases/Controllers/ONOS/Teston/onosfunctest.py b/functest/opnfv_tests/Controllers/ONOS/Teston/onosfunctest.py similarity index 100% rename from testcases/Controllers/ONOS/Teston/onosfunctest.py rename to functest/opnfv_tests/Controllers/ONOS/Teston/onosfunctest.py diff --git a/testcases/Controllers/__init__.py b/functest/opnfv_tests/Controllers/__init__.py similarity index 100% rename from testcases/Controllers/__init__.py rename to functest/opnfv_tests/Controllers/__init__.py diff --git a/testcases/OpenStack/examples/create_instance_and_ip.py b/functest/opnfv_tests/OpenStack/examples/create_instance_and_ip.py similarity index 100% rename from testcases/OpenStack/examples/create_instance_and_ip.py rename to functest/opnfv_tests/OpenStack/examples/create_instance_and_ip.py diff --git a/testcases/OpenStack/healthcheck/healthcheck.sh b/functest/opnfv_tests/OpenStack/healthcheck/healthcheck.sh similarity index 100% rename from testcases/OpenStack/healthcheck/healthcheck.sh rename to functest/opnfv_tests/OpenStack/healthcheck/healthcheck.sh diff --git a/testcases/OpenStack/rally/blacklist.txt b/functest/opnfv_tests/OpenStack/rally/blacklist.txt similarity index 100% rename from testcases/OpenStack/rally/blacklist.txt rename to functest/opnfv_tests/OpenStack/rally/blacklist.txt diff --git a/testcases/OpenStack/rally/macro/macro.yaml b/functest/opnfv_tests/OpenStack/rally/macro/macro.yaml similarity index 100% rename from testcases/OpenStack/rally/macro/macro.yaml rename to functest/opnfv_tests/OpenStack/rally/macro/macro.yaml diff --git a/testcases/OpenStack/rally/run_rally-cert.py b/functest/opnfv_tests/OpenStack/rally/run_rally-cert.py similarity index 100% rename from testcases/OpenStack/rally/run_rally-cert.py rename to functest/opnfv_tests/OpenStack/rally/run_rally-cert.py diff --git a/testcases/OpenStack/rally/scenario/full/opnfv-cinder.yaml b/functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-cinder.yaml similarity index 100% rename from testcases/OpenStack/rally/scenario/full/opnfv-cinder.yaml rename to functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-cinder.yaml diff --git a/testcases/OpenStack/rally/scenario/full/opnfv-heat.yaml b/functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-heat.yaml similarity index 100% rename from testcases/OpenStack/rally/scenario/full/opnfv-heat.yaml rename to functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-heat.yaml diff --git a/testcases/OpenStack/rally/scenario/full/opnfv-neutron.yaml b/functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-neutron.yaml similarity index 100% rename from testcases/OpenStack/rally/scenario/full/opnfv-neutron.yaml rename to functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-neutron.yaml diff --git a/testcases/OpenStack/rally/scenario/full/opnfv-nova.yaml b/functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-nova.yaml similarity index 100% rename from testcases/OpenStack/rally/scenario/full/opnfv-nova.yaml rename to functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-nova.yaml diff --git a/testcases/OpenStack/rally/scenario/opnfv-authenticate.yaml b/functest/opnfv_tests/OpenStack/rally/scenario/opnfv-authenticate.yaml similarity index 100% rename from testcases/OpenStack/rally/scenario/opnfv-authenticate.yaml rename to functest/opnfv_tests/OpenStack/rally/scenario/opnfv-authenticate.yaml diff --git a/testcases/OpenStack/rally/scenario/opnfv-glance.yaml b/functest/opnfv_tests/OpenStack/rally/scenario/opnfv-glance.yaml similarity index 100% rename from testcases/OpenStack/rally/scenario/opnfv-glance.yaml rename to functest/opnfv_tests/OpenStack/rally/scenario/opnfv-glance.yaml diff --git a/testcases/OpenStack/rally/scenario/opnfv-keystone.yaml b/functest/opnfv_tests/OpenStack/rally/scenario/opnfv-keystone.yaml similarity index 100% rename from testcases/OpenStack/rally/scenario/opnfv-keystone.yaml rename to functest/opnfv_tests/OpenStack/rally/scenario/opnfv-keystone.yaml diff --git a/testcases/OpenStack/rally/scenario/opnfv-quotas.yaml b/functest/opnfv_tests/OpenStack/rally/scenario/opnfv-quotas.yaml similarity index 100% rename from testcases/OpenStack/rally/scenario/opnfv-quotas.yaml rename to functest/opnfv_tests/OpenStack/rally/scenario/opnfv-quotas.yaml diff --git a/testcases/OpenStack/rally/scenario/opnfv-requests.yaml b/functest/opnfv_tests/OpenStack/rally/scenario/opnfv-requests.yaml similarity index 100% rename from testcases/OpenStack/rally/scenario/opnfv-requests.yaml rename to functest/opnfv_tests/OpenStack/rally/scenario/opnfv-requests.yaml diff --git a/testcases/OpenStack/rally/scenario/opnfv-vm.yaml b/functest/opnfv_tests/OpenStack/rally/scenario/opnfv-vm.yaml similarity index 100% rename from testcases/OpenStack/rally/scenario/opnfv-vm.yaml rename to functest/opnfv_tests/OpenStack/rally/scenario/opnfv-vm.yaml diff --git a/testcases/OpenStack/rally/scenario/sanity/opnfv-cinder.yaml b/functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-cinder.yaml similarity index 100% rename from testcases/OpenStack/rally/scenario/sanity/opnfv-cinder.yaml rename to functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-cinder.yaml diff --git a/testcases/OpenStack/rally/scenario/sanity/opnfv-heat.yaml b/functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-heat.yaml similarity index 100% rename from testcases/OpenStack/rally/scenario/sanity/opnfv-heat.yaml rename to functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-heat.yaml diff --git a/testcases/OpenStack/rally/scenario/sanity/opnfv-neutron.yaml b/functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-neutron.yaml similarity index 100% rename from testcases/OpenStack/rally/scenario/sanity/opnfv-neutron.yaml rename to functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-neutron.yaml diff --git a/testcases/OpenStack/rally/scenario/sanity/opnfv-nova.yaml b/functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-nova.yaml similarity index 100% rename from testcases/OpenStack/rally/scenario/sanity/opnfv-nova.yaml rename to functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-nova.yaml diff --git a/testcases/OpenStack/rally/scenario/support/instance_dd_test.sh b/functest/opnfv_tests/OpenStack/rally/scenario/support/instance_dd_test.sh similarity index 100% rename from testcases/OpenStack/rally/scenario/support/instance_dd_test.sh rename to functest/opnfv_tests/OpenStack/rally/scenario/support/instance_dd_test.sh diff --git a/testcases/OpenStack/rally/scenario/templates/autoscaling_policy.yaml.template b/functest/opnfv_tests/OpenStack/rally/scenario/templates/autoscaling_policy.yaml.template similarity index 100% rename from testcases/OpenStack/rally/scenario/templates/autoscaling_policy.yaml.template rename to functest/opnfv_tests/OpenStack/rally/scenario/templates/autoscaling_policy.yaml.template diff --git a/testcases/OpenStack/rally/scenario/templates/default.yaml.template b/functest/opnfv_tests/OpenStack/rally/scenario/templates/default.yaml.template similarity index 100% rename from testcases/OpenStack/rally/scenario/templates/default.yaml.template rename to functest/opnfv_tests/OpenStack/rally/scenario/templates/default.yaml.template diff --git a/testcases/OpenStack/rally/scenario/templates/random_strings.yaml.template b/functest/opnfv_tests/OpenStack/rally/scenario/templates/random_strings.yaml.template similarity index 100% rename from testcases/OpenStack/rally/scenario/templates/random_strings.yaml.template rename to functest/opnfv_tests/OpenStack/rally/scenario/templates/random_strings.yaml.template diff --git a/testcases/OpenStack/rally/scenario/templates/resource_group.yaml.template b/functest/opnfv_tests/OpenStack/rally/scenario/templates/resource_group.yaml.template similarity index 100% rename from testcases/OpenStack/rally/scenario/templates/resource_group.yaml.template rename to functest/opnfv_tests/OpenStack/rally/scenario/templates/resource_group.yaml.template diff --git a/testcases/OpenStack/rally/scenario/templates/server_with_ports.yaml.template b/functest/opnfv_tests/OpenStack/rally/scenario/templates/server_with_ports.yaml.template similarity index 100% rename from testcases/OpenStack/rally/scenario/templates/server_with_ports.yaml.template rename to functest/opnfv_tests/OpenStack/rally/scenario/templates/server_with_ports.yaml.template diff --git a/testcases/OpenStack/rally/scenario/templates/server_with_volume.yaml.template b/functest/opnfv_tests/OpenStack/rally/scenario/templates/server_with_volume.yaml.template similarity index 100% rename from testcases/OpenStack/rally/scenario/templates/server_with_volume.yaml.template rename to functest/opnfv_tests/OpenStack/rally/scenario/templates/server_with_volume.yaml.template diff --git a/testcases/OpenStack/rally/scenario/templates/updated_autoscaling_policy_inplace.yaml.template b/functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_autoscaling_policy_inplace.yaml.template similarity index 100% rename from testcases/OpenStack/rally/scenario/templates/updated_autoscaling_policy_inplace.yaml.template rename to functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_autoscaling_policy_inplace.yaml.template diff --git a/testcases/OpenStack/rally/scenario/templates/updated_random_strings_add.yaml.template b/functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_random_strings_add.yaml.template similarity index 100% rename from testcases/OpenStack/rally/scenario/templates/updated_random_strings_add.yaml.template rename to functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_random_strings_add.yaml.template diff --git a/testcases/OpenStack/rally/scenario/templates/updated_random_strings_delete.yaml.template b/functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_random_strings_delete.yaml.template similarity index 100% rename from testcases/OpenStack/rally/scenario/templates/updated_random_strings_delete.yaml.template rename to functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_random_strings_delete.yaml.template diff --git a/testcases/OpenStack/rally/scenario/templates/updated_random_strings_replace.yaml.template b/functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_random_strings_replace.yaml.template similarity index 100% rename from testcases/OpenStack/rally/scenario/templates/updated_random_strings_replace.yaml.template rename to functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_random_strings_replace.yaml.template diff --git a/testcases/OpenStack/rally/scenario/templates/updated_resource_group_increase.yaml.template b/functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_resource_group_increase.yaml.template similarity index 100% rename from testcases/OpenStack/rally/scenario/templates/updated_resource_group_increase.yaml.template rename to functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_resource_group_increase.yaml.template diff --git a/testcases/OpenStack/rally/scenario/templates/updated_resource_group_reduce.yaml.template b/functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_resource_group_reduce.yaml.template similarity index 100% rename from testcases/OpenStack/rally/scenario/templates/updated_resource_group_reduce.yaml.template rename to functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_resource_group_reduce.yaml.template diff --git a/testcases/OpenStack/rally/task.yaml b/functest/opnfv_tests/OpenStack/rally/task.yaml similarity index 100% rename from testcases/OpenStack/rally/task.yaml rename to functest/opnfv_tests/OpenStack/rally/task.yaml diff --git a/testcases/OpenStack/tempest/custom_tests/blacklist.txt b/functest/opnfv_tests/OpenStack/tempest/custom_tests/blacklist.txt similarity index 100% rename from testcases/OpenStack/tempest/custom_tests/blacklist.txt rename to functest/opnfv_tests/OpenStack/tempest/custom_tests/blacklist.txt diff --git a/testcases/OpenStack/tempest/custom_tests/defcore_req.txt b/functest/opnfv_tests/OpenStack/tempest/custom_tests/defcore_req.txt similarity index 100% rename from testcases/OpenStack/tempest/custom_tests/defcore_req.txt rename to functest/opnfv_tests/OpenStack/tempest/custom_tests/defcore_req.txt diff --git a/testcases/OpenStack/tempest/gen_tempest_conf.py b/functest/opnfv_tests/OpenStack/tempest/gen_tempest_conf.py similarity index 100% rename from testcases/OpenStack/tempest/gen_tempest_conf.py rename to functest/opnfv_tests/OpenStack/tempest/gen_tempest_conf.py diff --git a/testcases/OpenStack/tempest/run_tempest.py b/functest/opnfv_tests/OpenStack/tempest/run_tempest.py similarity index 100% rename from testcases/OpenStack/tempest/run_tempest.py rename to functest/opnfv_tests/OpenStack/tempest/run_tempest.py diff --git a/testcases/OpenStack/vPing/ping.sh b/functest/opnfv_tests/OpenStack/vPing/ping.sh similarity index 100% rename from testcases/OpenStack/vPing/ping.sh rename to functest/opnfv_tests/OpenStack/vPing/ping.sh diff --git a/testcases/OpenStack/vPing/vping.py b/functest/opnfv_tests/OpenStack/vPing/vping.py similarity index 100% rename from testcases/OpenStack/vPing/vping.py rename to functest/opnfv_tests/OpenStack/vPing/vping.py diff --git a/testcases/OpenStack/vPing/vping_util.py b/functest/opnfv_tests/OpenStack/vPing/vping_util.py similarity index 99% rename from testcases/OpenStack/vPing/vping_util.py rename to functest/opnfv_tests/OpenStack/vPing/vping_util.py index cf5a28dbd..ccd9db064 100644 --- a/testcases/OpenStack/vPing/vping_util.py +++ b/functest/opnfv_tests/OpenStack/vPing/vping_util.py @@ -339,7 +339,7 @@ def transfer_ping_script(ssh, floatip): logger.info("Trying to transfer ping.sh to %s..." % floatip) scp = SCPClient(ssh.get_transport()) - ping_script = FUNCTEST_REPO + "/testcases/OpenStack/vPing/ping.sh" + ping_script = FUNCTEST_REPO + "/opnfv_tests/OpenStack/vPing/ping.sh" try: scp.put(ping_script, "~/") except: diff --git a/testcases/__init__.py b/functest/opnfv_tests/__init__.py similarity index 100% rename from testcases/__init__.py rename to functest/opnfv_tests/__init__.py diff --git a/testcases/features/copper.py b/functest/opnfv_tests/features/copper.py similarity index 100% rename from testcases/features/copper.py rename to functest/opnfv_tests/features/copper.py diff --git a/testcases/features/doctor.py b/functest/opnfv_tests/features/doctor.py similarity index 100% rename from testcases/features/doctor.py rename to functest/opnfv_tests/features/doctor.py diff --git a/testcases/features/domino.py b/functest/opnfv_tests/features/domino.py similarity index 100% rename from testcases/features/domino.py rename to functest/opnfv_tests/features/domino.py diff --git a/testcases/features/multisite.py b/functest/opnfv_tests/features/multisite.py similarity index 100% rename from testcases/features/multisite.py rename to functest/opnfv_tests/features/multisite.py diff --git a/testcases/features/promise.py b/functest/opnfv_tests/features/promise.py similarity index 100% rename from testcases/features/promise.py rename to functest/opnfv_tests/features/promise.py diff --git a/testcases/features/sfc/SSHUtils.py b/functest/opnfv_tests/features/sfc/SSHUtils.py similarity index 100% rename from testcases/features/sfc/SSHUtils.py rename to functest/opnfv_tests/features/sfc/SSHUtils.py diff --git a/testcases/features/sfc/compute_presetup_CI.bash b/functest/opnfv_tests/features/sfc/compute_presetup_CI.bash similarity index 100% rename from testcases/features/sfc/compute_presetup_CI.bash rename to functest/opnfv_tests/features/sfc/compute_presetup_CI.bash diff --git a/testcases/features/sfc/correct_classifier.bash b/functest/opnfv_tests/features/sfc/correct_classifier.bash similarity index 100% rename from testcases/features/sfc/correct_classifier.bash rename to functest/opnfv_tests/features/sfc/correct_classifier.bash diff --git a/testcases/features/sfc/delete.sh b/functest/opnfv_tests/features/sfc/delete.sh similarity index 100% rename from testcases/features/sfc/delete.sh rename to functest/opnfv_tests/features/sfc/delete.sh diff --git a/testcases/features/sfc/ovs_utils.py b/functest/opnfv_tests/features/sfc/ovs_utils.py similarity index 100% rename from testcases/features/sfc/ovs_utils.py rename to functest/opnfv_tests/features/sfc/ovs_utils.py diff --git a/testcases/features/sfc/prepare_odl_sfc.bash b/functest/opnfv_tests/features/sfc/prepare_odl_sfc.bash similarity index 94% rename from testcases/features/sfc/prepare_odl_sfc.bash rename to functest/opnfv_tests/features/sfc/prepare_odl_sfc.bash index 80ed9bd92..c4d8f4f81 100755 --- a/testcases/features/sfc/prepare_odl_sfc.bash +++ b/functest/opnfv_tests/features/sfc/prepare_odl_sfc.bash @@ -13,7 +13,7 @@ # ODL_SFC_LOG=/home/opnfv/functest/results/odl-sfc.log -ODL_SFC_DIR=${FUNCTEST_REPO_DIR}/testcases/features/sfc +ODL_SFC_DIR=${FUNCTEST_REPO_DIR}/opnfv_tests/features/sfc # Split the output to the log file and redirect STDOUT and STDERR to /dev/null bash ${ODL_SFC_DIR}/server_presetup_CI.bash |& \ diff --git a/testcases/features/sfc/prepare_odl_sfc.py b/functest/opnfv_tests/features/sfc/prepare_odl_sfc.py similarity index 97% rename from testcases/features/sfc/prepare_odl_sfc.py rename to functest/opnfv_tests/features/sfc/prepare_odl_sfc.py index 78f4d7646..3d700b8a7 100755 --- a/testcases/features/sfc/prepare_odl_sfc.py +++ b/functest/opnfv_tests/features/sfc/prepare_odl_sfc.py @@ -33,7 +33,7 @@ except: INSTALLER_IP = "10.20.0.2" os.environ['ODL_SFC_LOG'] = "/home/opnfv/functest/results/odl-sfc.log" -os.environ['ODL_SFC_DIR'] = FUNCTEST_REPO_DIR + "/testcases/features/sfc" +os.environ['ODL_SFC_DIR'] = FUNCTEST_REPO_DIR + "/opnfv_tests/features/sfc" command = os.environ['ODL_SFC_DIR'] + ("/server_presetup_CI.bash | " "tee -a ${ODL_SFC_LOG} " diff --git a/testcases/features/sfc/server_presetup_CI.bash b/functest/opnfv_tests/features/sfc/server_presetup_CI.bash similarity index 100% rename from testcases/features/sfc/server_presetup_CI.bash rename to functest/opnfv_tests/features/sfc/server_presetup_CI.bash diff --git a/testcases/features/sfc/sfc.py b/functest/opnfv_tests/features/sfc/sfc.py similarity index 99% rename from testcases/features/sfc/sfc.py rename to functest/opnfv_tests/features/sfc/sfc.py index 2cc7ac9c0..17ffef225 100755 --- a/testcases/features/sfc/sfc.py +++ b/functest/opnfv_tests/features/sfc/sfc.py @@ -43,7 +43,7 @@ SUBNET_CIDR = "11.0.0.0/24" ROUTER_NAME = "example-router" SECGROUP_NAME = "example-sg" SECGROUP_DESCR = "Example Security group" -SFC_TEST_DIR = REPO_PATH + "/testcases/features/sfc/" +SFC_TEST_DIR = REPO_PATH + "/opnfv_tests/features/sfc/" TACKER_SCRIPT = SFC_TEST_DIR + "sfc_tacker.bash" TACKER_CHANGECLASSI = SFC_TEST_DIR + "sfc_change_classi.bash" ssh_options = '-q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' diff --git a/testcases/features/sfc/sfc_change_classi.bash b/functest/opnfv_tests/features/sfc/sfc_change_classi.bash similarity index 100% rename from testcases/features/sfc/sfc_change_classi.bash rename to functest/opnfv_tests/features/sfc/sfc_change_classi.bash diff --git a/testcases/features/sfc/sfc_colorado1.py b/functest/opnfv_tests/features/sfc/sfc_colorado1.py similarity index 99% rename from testcases/features/sfc/sfc_colorado1.py rename to functest/opnfv_tests/features/sfc/sfc_colorado1.py index d31541d13..6965f283a 100755 --- a/testcases/features/sfc/sfc_colorado1.py +++ b/functest/opnfv_tests/features/sfc/sfc_colorado1.py @@ -302,7 +302,7 @@ def main(): # CREATION OF THE 2 SF #### - tacker_script = "%s/testcases/features/sfc/%s" % \ + tacker_script = "%s/opnfv_tests/features/sfc/%s" % \ (FUNCTEST_REPO, TACKER_SCRIPT) logger.info("Executing tacker script: '%s'" % tacker_script) subprocess.call(tacker_script, shell=True) @@ -492,7 +492,7 @@ def main(): # CHANGE OF CLASSIFICATION # logger.info("Changing the classification") - tacker_classi = "%s/testcases/features/sfc/%s" % \ + tacker_classi = "%s/opnfv_tests/features/sfc/%s" % \ (FUNCTEST_REPO, TACKER_CHANGECLASSI) subprocess.call(tacker_classi, shell=True) @@ -568,7 +568,7 @@ def main(): break else: logger.info("Iterating again!") - delete = "bash %s/testcases/features/sfc/delete.sh" % \ + delete = "bash %s/opnfv_tests/features/sfc/delete.sh" % \ (FUNCTEST_REPO) try: subprocess.call(delete, shell=True, stderr=subprocess.PIPE) diff --git a/testcases/features/sfc/sfc_tacker.bash b/functest/opnfv_tests/features/sfc/sfc_tacker.bash similarity index 100% rename from testcases/features/sfc/sfc_tacker.bash rename to functest/opnfv_tests/features/sfc/sfc_tacker.bash diff --git a/testcases/features/sfc/tacker_client_install.sh b/functest/opnfv_tests/features/sfc/tacker_client_install.sh similarity index 100% rename from testcases/features/sfc/tacker_client_install.sh rename to functest/opnfv_tests/features/sfc/tacker_client_install.sh diff --git a/testcases/features/sfc/test-vnfd1.yaml b/functest/opnfv_tests/features/sfc/test-vnfd1.yaml similarity index 100% rename from testcases/features/sfc/test-vnfd1.yaml rename to functest/opnfv_tests/features/sfc/test-vnfd1.yaml diff --git a/testcases/features/sfc/test-vnfd2.yaml b/functest/opnfv_tests/features/sfc/test-vnfd2.yaml similarity index 100% rename from testcases/features/sfc/test-vnfd2.yaml rename to functest/opnfv_tests/features/sfc/test-vnfd2.yaml diff --git a/testcases/security_scan/config.ini b/functest/opnfv_tests/security_scan/config.ini similarity index 100% rename from testcases/security_scan/config.ini rename to functest/opnfv_tests/security_scan/config.ini diff --git a/testcases/security_scan/connect.py b/functest/opnfv_tests/security_scan/connect.py similarity index 100% rename from testcases/security_scan/connect.py rename to functest/opnfv_tests/security_scan/connect.py diff --git a/testcases/security_scan/examples/xccdf-rhel7-server-upstream.ini b/functest/opnfv_tests/security_scan/examples/xccdf-rhel7-server-upstream.ini similarity index 100% rename from testcases/security_scan/examples/xccdf-rhel7-server-upstream.ini rename to functest/opnfv_tests/security_scan/examples/xccdf-rhel7-server-upstream.ini diff --git a/testcases/security_scan/examples/xccdf-standard.ini b/functest/opnfv_tests/security_scan/examples/xccdf-standard.ini similarity index 100% rename from testcases/security_scan/examples/xccdf-standard.ini rename to functest/opnfv_tests/security_scan/examples/xccdf-standard.ini diff --git a/testcases/security_scan/scripts/createfiles.py b/functest/opnfv_tests/security_scan/scripts/createfiles.py similarity index 100% rename from testcases/security_scan/scripts/createfiles.py rename to functest/opnfv_tests/security_scan/scripts/createfiles.py diff --git a/testcases/security_scan/scripts/internet_check.py b/functest/opnfv_tests/security_scan/scripts/internet_check.py similarity index 100% rename from testcases/security_scan/scripts/internet_check.py rename to functest/opnfv_tests/security_scan/scripts/internet_check.py diff --git a/testcases/security_scan/security_scan.py b/functest/opnfv_tests/security_scan/security_scan.py similarity index 99% rename from testcases/security_scan/security_scan.py rename to functest/opnfv_tests/security_scan/security_scan.py index 98e6b7a8c..4e0407fba 100755 --- a/testcases/security_scan/security_scan.py +++ b/functest/opnfv_tests/security_scan/security_scan.py @@ -33,7 +33,7 @@ __url__ = 'https://wiki.opnfv.org/display/functest/Functest+Security' # Global vars INSTALLER_IP = os.getenv('INSTALLER_IP') oscapbin = 'sudo /bin/oscap' -functest_dir = '%s/testcases/security_scan/' % ft_utils.FUNCTEST_REPO +functest_dir = '%s/opnfv_tests/security_scan/' % ft_utils.FUNCTEST_REPO # Apex Spefic var needed to query Undercloud if os.getenv('OS_AUTH_URL') is None: diff --git a/testcases/vnf/vIMS/clearwater.py b/functest/opnfv_tests/vnf/vIMS/clearwater.py similarity index 100% rename from testcases/vnf/vIMS/clearwater.py rename to functest/opnfv_tests/vnf/vIMS/clearwater.py diff --git a/testcases/vnf/vIMS/create_venv.sh b/functest/opnfv_tests/vnf/vIMS/create_venv.sh similarity index 100% rename from testcases/vnf/vIMS/create_venv.sh rename to functest/opnfv_tests/vnf/vIMS/create_venv.sh diff --git a/testcases/vnf/vIMS/orchestrator.py b/functest/opnfv_tests/vnf/vIMS/orchestrator.py similarity index 100% rename from testcases/vnf/vIMS/orchestrator.py rename to functest/opnfv_tests/vnf/vIMS/orchestrator.py diff --git a/testcases/vnf/vIMS/requirements.pip b/functest/opnfv_tests/vnf/vIMS/requirements.pip similarity index 100% rename from testcases/vnf/vIMS/requirements.pip rename to functest/opnfv_tests/vnf/vIMS/requirements.pip diff --git a/testcases/vnf/vIMS/vIMS.py b/functest/opnfv_tests/vnf/vIMS/vIMS.py similarity index 100% rename from testcases/vnf/vIMS/vIMS.py rename to functest/opnfv_tests/vnf/vIMS/vIMS.py diff --git a/testcases/vnf/vRNC/parser.py b/functest/opnfv_tests/vnf/vRNC/parser.py similarity index 100% rename from testcases/vnf/vRNC/parser.py rename to functest/opnfv_tests/vnf/vRNC/parser.py diff --git a/unit_tests/__init__.py b/functest/tests/__init__.py similarity index 100% rename from unit_tests/__init__.py rename to functest/tests/__init__.py diff --git a/unit_tests/core/__init__.py b/functest/tests/unit/__init__.py similarity index 100% rename from unit_tests/core/__init__.py rename to functest/tests/unit/__init__.py diff --git a/unit_tests/odl/__init__.py b/functest/tests/unit/core/__init__.py similarity index 100% rename from unit_tests/odl/__init__.py rename to functest/tests/unit/core/__init__.py diff --git a/unit_tests/core/test_base.py b/functest/tests/unit/core/test_base.py similarity index 100% rename from unit_tests/core/test_base.py rename to functest/tests/unit/core/test_base.py diff --git a/utils/__init__.py b/functest/tests/unit/odl/__init__.py similarity index 100% rename from utils/__init__.py rename to functest/tests/unit/odl/__init__.py diff --git a/unit_tests/odl/test_odl.py b/functest/tests/unit/odl/test_odl.py similarity index 99% rename from unit_tests/odl/test_odl.py rename to functest/tests/unit/odl/test_odl.py index cbe4df686..3f33dc88e 100644 --- a/unit_tests/odl/test_odl.py +++ b/functest/tests/unit/odl/test_odl.py @@ -16,7 +16,7 @@ import unittest from robot.errors import RobotError from functest.core import TestCasesBase -from functest.testcases.Controllers.ODL import OpenDaylightTesting +from functest.opnfv_tests.Controllers.ODL import OpenDaylightTesting class ODLTestCasesTesting(unittest.TestCase): diff --git a/functest/tests/unit/utils/__init__.py b/functest/tests/unit/utils/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/functest/tests/unit/utils/test_utils.py b/functest/tests/unit/utils/test_utils.py new file mode 100644 index 000000000..36313d25d --- /dev/null +++ b/functest/tests/unit/utils/test_utils.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python + +# Copyright (c) 2016 Orange and others. +# +# 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 + +import logging +import unittest + +from functest.utils import functest_utils + + +class FunctestUtilsTesting(unittest.TestCase): + + logging.disable(logging.CRITICAL) + + def setUp(self): + self.test = functest_utils + + def test_check_internet_connectivity(self): + self.assertTrue(self.test.check_internet_connectivity()) +# TODO +# ... + +if __name__ == "__main__": + unittest.main(verbosity=2) diff --git a/functest/utils/__init__.py b/functest/utils/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/utils/functest_logger.py b/functest/utils/functest_logger.py similarity index 100% rename from utils/functest_logger.py rename to functest/utils/functest_logger.py diff --git a/utils/functest_utils.py b/functest/utils/functest_utils.py similarity index 100% rename from utils/functest_utils.py rename to functest/utils/functest_utils.py diff --git a/utils/functest_vacation.py b/functest/utils/functest_vacation.py similarity index 100% rename from utils/functest_vacation.py rename to functest/utils/functest_vacation.py diff --git a/utils/openstack_clean.py b/functest/utils/openstack_clean.py similarity index 100% rename from utils/openstack_clean.py rename to functest/utils/openstack_clean.py diff --git a/utils/openstack_snapshot.py b/functest/utils/openstack_snapshot.py similarity index 100% rename from utils/openstack_snapshot.py rename to functest/utils/openstack_snapshot.py diff --git a/utils/openstack_tacker.py b/functest/utils/openstack_tacker.py similarity index 100% rename from utils/openstack_tacker.py rename to functest/utils/openstack_tacker.py diff --git a/utils/openstack_utils.py b/functest/utils/openstack_utils.py similarity index 100% rename from utils/openstack_utils.py rename to functest/utils/openstack_utils.py diff --git a/run_unit_tests.sh b/run_unit_tests.sh index bbe95cc8c..e050418c5 100755 --- a/run_unit_tests.sh +++ b/run_unit_tests.sh @@ -25,25 +25,9 @@ sudo touch /home/opnfv/functest/results/odl/stdout.txt sudo chmod -Rf a+rw /home/opnfv # Either Workspace is set (CI) -# then useless log files must belong to jenkins:jenkins -# or it is local tests and we do not care if [ -z $WORKSPACE ] then WORKSPACE="." -else - sudo chown -Rf jenkins:jenkins /home/opnfv - # as we import the module from the home repo - # and in jenkins the name is different - # functest-verify-master != functest - # make some ugly adjustments... - cd $WORKSPACE - export PYTHONPATH="${PYTHONPATH}:$WORKSPACE" - cd .. - - if [ ! -d "./functest" ] - then - ln -s functest-verify-master functest - fi fi @@ -74,7 +58,7 @@ nosetests --with-xunit \ --cover-package=functest.testcases.Controllers.ODL.OpenDaylightTesting \ --cover-xml \ --cover-html \ - unit_tests + functest/tests/unit rc=$? deactivate @@ -82,13 +66,6 @@ deactivate # ******* # clean # ******* -# First as we had to start the test from .. -# Push the results upstream for jenkins -if [ $WORKSPACE != "." ] -then - mv coverage.xml nosetests.xml $WORKSPACE -fi - # Clean useless logs if [ -d "/home/opnfv/functest/results" ] then -- 2.16.6