Repo structure modification 65/24065/5
authorMorgan Richomme <morgan.richomme@orange.com>
Tue, 8 Nov 2016 13:18:12 +0000 (14:18 +0100)
committerMorgan Richomme <morgan.richomme@orange.com>
Wed, 9 Nov 2016 15:55:45 +0000 (16:55 +0100)
- create functest subdirectory
- rename unit tests
- adapt path in exec and config files

JIRA: FUNCTEST-525

Change-Id: Ifd5c6edfb5bda1b09f82848e2269ad5fbeb84d0a
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
123 files changed:
ci/config_functest.yaml
ci/exec_test.sh
ci/testcases.yaml
docker/Dockerfile
functest/__init__.py [moved from __init__.py with 100% similarity]
functest/cli/__init__.py [moved from cli/__init__.py with 100% similarity]
functest/cli/cli_base.py [moved from cli/cli_base.py with 100% similarity]
functest/cli/commands/__init__.py [moved from cli/commands/__init__.py with 100% similarity]
functest/cli/commands/cli_env.py [moved from cli/commands/cli_env.py with 100% similarity]
functest/cli/commands/cli_os.py [moved from cli/commands/cli_os.py with 100% similarity]
functest/cli/commands/cli_testcase.py [moved from cli/commands/cli_testcase.py with 100% similarity]
functest/cli/commands/cli_tier.py [moved from cli/commands/cli_tier.py with 100% similarity]
functest/cli/functest-complete.sh [moved from cli/functest-complete.sh with 100% similarity]
functest/cli/setup.py [moved from cli/setup.py with 100% similarity]
functest/core/TestCasesBase.py [moved from core/TestCasesBase.py with 100% similarity]
functest/core/__init__.py [moved from core/__init__.py with 100% similarity]
functest/opnfv_tests/Controllers/ODL/OpenDaylightTesting.py [moved from testcases/Controllers/ODL/OpenDaylightTesting.py with 100% similarity]
functest/opnfv_tests/Controllers/ODL/__init__.py [moved from testcases/Controllers/ODL/__init__.py with 100% similarity]
functest/opnfv_tests/Controllers/ONOS/Sfc/README.md [moved from testcases/Controllers/ONOS/Sfc/README.md with 100% similarity]
functest/opnfv_tests/Controllers/ONOS/Sfc/Sfc.py [moved from testcases/Controllers/ONOS/Sfc/Sfc.py with 100% similarity]
functest/opnfv_tests/Controllers/ONOS/Sfc/Sfc_fun.py [moved from testcases/Controllers/ONOS/Sfc/Sfc_fun.py with 100% similarity]
functest/opnfv_tests/Controllers/ONOS/Teston/Readme.txt [moved from testcases/Controllers/ONOS/Teston/Readme.txt with 100% similarity]
functest/opnfv_tests/Controllers/ONOS/Teston/__init__.py [moved from testcases/Controllers/ONOS/Teston/__init__.py with 100% similarity]
functest/opnfv_tests/Controllers/ONOS/Teston/adapters/__init__.py [moved from testcases/Controllers/ONOS/Teston/adapters/__init__.py with 100% similarity]
functest/opnfv_tests/Controllers/ONOS/Teston/adapters/client.py [moved from testcases/Controllers/ONOS/Teston/adapters/client.py with 100% similarity]
functest/opnfv_tests/Controllers/ONOS/Teston/adapters/connection.py [moved from testcases/Controllers/ONOS/Teston/adapters/connection.py with 100% similarity]
functest/opnfv_tests/Controllers/ONOS/Teston/adapters/environment.py [moved from testcases/Controllers/ONOS/Teston/adapters/environment.py with 100% similarity]
functest/opnfv_tests/Controllers/ONOS/Teston/adapters/foundation.py [moved from testcases/Controllers/ONOS/Teston/adapters/foundation.py with 96% similarity]
functest/opnfv_tests/Controllers/ONOS/Teston/dependencies/onos [moved from testcases/Controllers/ONOS/Teston/dependencies/onos with 100% similarity]
functest/opnfv_tests/Controllers/ONOS/Teston/log/gitignore [moved from testcases/Controllers/ONOS/Teston/log/gitignore with 100% similarity]
functest/opnfv_tests/Controllers/ONOS/Teston/onosfunctest.py [moved from testcases/Controllers/ONOS/Teston/onosfunctest.py with 100% similarity]
functest/opnfv_tests/Controllers/__init__.py [moved from testcases/Controllers/__init__.py with 100% similarity]
functest/opnfv_tests/OpenStack/examples/create_instance_and_ip.py [moved from testcases/OpenStack/examples/create_instance_and_ip.py with 100% similarity]
functest/opnfv_tests/OpenStack/healthcheck/healthcheck.sh [moved from testcases/OpenStack/healthcheck/healthcheck.sh with 100% similarity]
functest/opnfv_tests/OpenStack/rally/blacklist.txt [moved from testcases/OpenStack/rally/blacklist.txt with 100% similarity]
functest/opnfv_tests/OpenStack/rally/macro/macro.yaml [moved from testcases/OpenStack/rally/macro/macro.yaml with 100% similarity]
functest/opnfv_tests/OpenStack/rally/run_rally-cert.py [moved from testcases/OpenStack/rally/run_rally-cert.py with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-cinder.yaml [moved from testcases/OpenStack/rally/scenario/full/opnfv-cinder.yaml with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-heat.yaml [moved from testcases/OpenStack/rally/scenario/full/opnfv-heat.yaml with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-neutron.yaml [moved from testcases/OpenStack/rally/scenario/full/opnfv-neutron.yaml with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/full/opnfv-nova.yaml [moved from testcases/OpenStack/rally/scenario/full/opnfv-nova.yaml with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/opnfv-authenticate.yaml [moved from testcases/OpenStack/rally/scenario/opnfv-authenticate.yaml with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/opnfv-glance.yaml [moved from testcases/OpenStack/rally/scenario/opnfv-glance.yaml with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/opnfv-keystone.yaml [moved from testcases/OpenStack/rally/scenario/opnfv-keystone.yaml with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/opnfv-quotas.yaml [moved from testcases/OpenStack/rally/scenario/opnfv-quotas.yaml with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/opnfv-requests.yaml [moved from testcases/OpenStack/rally/scenario/opnfv-requests.yaml with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/opnfv-vm.yaml [moved from testcases/OpenStack/rally/scenario/opnfv-vm.yaml with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-cinder.yaml [moved from testcases/OpenStack/rally/scenario/sanity/opnfv-cinder.yaml with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-heat.yaml [moved from testcases/OpenStack/rally/scenario/sanity/opnfv-heat.yaml with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-neutron.yaml [moved from testcases/OpenStack/rally/scenario/sanity/opnfv-neutron.yaml with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/sanity/opnfv-nova.yaml [moved from testcases/OpenStack/rally/scenario/sanity/opnfv-nova.yaml with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/support/instance_dd_test.sh [moved from testcases/OpenStack/rally/scenario/support/instance_dd_test.sh with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/templates/autoscaling_policy.yaml.template [moved from testcases/OpenStack/rally/scenario/templates/autoscaling_policy.yaml.template with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/templates/default.yaml.template [moved from testcases/OpenStack/rally/scenario/templates/default.yaml.template with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/templates/random_strings.yaml.template [moved from testcases/OpenStack/rally/scenario/templates/random_strings.yaml.template with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/templates/resource_group.yaml.template [moved from testcases/OpenStack/rally/scenario/templates/resource_group.yaml.template with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/templates/server_with_ports.yaml.template [moved from testcases/OpenStack/rally/scenario/templates/server_with_ports.yaml.template with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/templates/server_with_volume.yaml.template [moved from testcases/OpenStack/rally/scenario/templates/server_with_volume.yaml.template with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_autoscaling_policy_inplace.yaml.template [moved from testcases/OpenStack/rally/scenario/templates/updated_autoscaling_policy_inplace.yaml.template with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_random_strings_add.yaml.template [moved from testcases/OpenStack/rally/scenario/templates/updated_random_strings_add.yaml.template with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_random_strings_delete.yaml.template [moved from testcases/OpenStack/rally/scenario/templates/updated_random_strings_delete.yaml.template with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_random_strings_replace.yaml.template [moved from testcases/OpenStack/rally/scenario/templates/updated_random_strings_replace.yaml.template with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_resource_group_increase.yaml.template [moved from testcases/OpenStack/rally/scenario/templates/updated_resource_group_increase.yaml.template with 100% similarity]
functest/opnfv_tests/OpenStack/rally/scenario/templates/updated_resource_group_reduce.yaml.template [moved from testcases/OpenStack/rally/scenario/templates/updated_resource_group_reduce.yaml.template with 100% similarity]
functest/opnfv_tests/OpenStack/rally/task.yaml [moved from testcases/OpenStack/rally/task.yaml with 100% similarity]
functest/opnfv_tests/OpenStack/tempest/custom_tests/blacklist.txt [moved from testcases/OpenStack/tempest/custom_tests/blacklist.txt with 100% similarity]
functest/opnfv_tests/OpenStack/tempest/custom_tests/defcore_req.txt [moved from testcases/OpenStack/tempest/custom_tests/defcore_req.txt with 100% similarity]
functest/opnfv_tests/OpenStack/tempest/gen_tempest_conf.py [moved from testcases/OpenStack/tempest/gen_tempest_conf.py with 100% similarity]
functest/opnfv_tests/OpenStack/tempest/run_tempest.py [moved from testcases/OpenStack/tempest/run_tempest.py with 100% similarity]
functest/opnfv_tests/OpenStack/vPing/ping.sh [moved from testcases/OpenStack/vPing/ping.sh with 100% similarity]
functest/opnfv_tests/OpenStack/vPing/vping.py [moved from testcases/OpenStack/vPing/vping.py with 100% similarity]
functest/opnfv_tests/OpenStack/vPing/vping_util.py [moved from testcases/OpenStack/vPing/vping_util.py with 99% similarity]
functest/opnfv_tests/__init__.py [moved from testcases/__init__.py with 100% similarity]
functest/opnfv_tests/features/copper.py [moved from testcases/features/copper.py with 100% similarity]
functest/opnfv_tests/features/doctor.py [moved from testcases/features/doctor.py with 100% similarity]
functest/opnfv_tests/features/domino.py [moved from testcases/features/domino.py with 100% similarity]
functest/opnfv_tests/features/multisite.py [moved from testcases/features/multisite.py with 100% similarity]
functest/opnfv_tests/features/promise.py [moved from testcases/features/promise.py with 100% similarity]
functest/opnfv_tests/features/sfc/SSHUtils.py [moved from testcases/features/sfc/SSHUtils.py with 100% similarity]
functest/opnfv_tests/features/sfc/compute_presetup_CI.bash [moved from testcases/features/sfc/compute_presetup_CI.bash with 100% similarity]
functest/opnfv_tests/features/sfc/correct_classifier.bash [moved from testcases/features/sfc/correct_classifier.bash with 100% similarity]
functest/opnfv_tests/features/sfc/delete.sh [moved from testcases/features/sfc/delete.sh with 100% similarity]
functest/opnfv_tests/features/sfc/ovs_utils.py [moved from testcases/features/sfc/ovs_utils.py with 100% similarity]
functest/opnfv_tests/features/sfc/prepare_odl_sfc.bash [moved from testcases/features/sfc/prepare_odl_sfc.bash with 94% similarity]
functest/opnfv_tests/features/sfc/prepare_odl_sfc.py [moved from testcases/features/sfc/prepare_odl_sfc.py with 97% similarity]
functest/opnfv_tests/features/sfc/server_presetup_CI.bash [moved from testcases/features/sfc/server_presetup_CI.bash with 100% similarity]
functest/opnfv_tests/features/sfc/sfc.py [moved from testcases/features/sfc/sfc.py with 99% similarity]
functest/opnfv_tests/features/sfc/sfc_change_classi.bash [moved from testcases/features/sfc/sfc_change_classi.bash with 100% similarity]
functest/opnfv_tests/features/sfc/sfc_colorado1.py [moved from testcases/features/sfc/sfc_colorado1.py with 99% similarity]
functest/opnfv_tests/features/sfc/sfc_tacker.bash [moved from testcases/features/sfc/sfc_tacker.bash with 100% similarity]
functest/opnfv_tests/features/sfc/tacker_client_install.sh [moved from testcases/features/sfc/tacker_client_install.sh with 100% similarity]
functest/opnfv_tests/features/sfc/test-vnfd1.yaml [moved from testcases/features/sfc/test-vnfd1.yaml with 100% similarity]
functest/opnfv_tests/features/sfc/test-vnfd2.yaml [moved from testcases/features/sfc/test-vnfd2.yaml with 100% similarity]
functest/opnfv_tests/security_scan/config.ini [moved from testcases/security_scan/config.ini with 100% similarity]
functest/opnfv_tests/security_scan/connect.py [moved from testcases/security_scan/connect.py with 100% similarity]
functest/opnfv_tests/security_scan/examples/xccdf-rhel7-server-upstream.ini [moved from testcases/security_scan/examples/xccdf-rhel7-server-upstream.ini with 100% similarity]
functest/opnfv_tests/security_scan/examples/xccdf-standard.ini [moved from testcases/security_scan/examples/xccdf-standard.ini with 100% similarity]
functest/opnfv_tests/security_scan/scripts/createfiles.py [moved from testcases/security_scan/scripts/createfiles.py with 100% similarity]
functest/opnfv_tests/security_scan/scripts/internet_check.py [moved from testcases/security_scan/scripts/internet_check.py with 100% similarity]
functest/opnfv_tests/security_scan/security_scan.py [moved from testcases/security_scan/security_scan.py with 99% similarity]
functest/opnfv_tests/vnf/vIMS/clearwater.py [moved from testcases/vnf/vIMS/clearwater.py with 100% similarity]
functest/opnfv_tests/vnf/vIMS/create_venv.sh [moved from testcases/vnf/vIMS/create_venv.sh with 100% similarity]
functest/opnfv_tests/vnf/vIMS/orchestrator.py [moved from testcases/vnf/vIMS/orchestrator.py with 100% similarity]
functest/opnfv_tests/vnf/vIMS/requirements.pip [moved from testcases/vnf/vIMS/requirements.pip with 100% similarity]
functest/opnfv_tests/vnf/vIMS/vIMS.py [moved from testcases/vnf/vIMS/vIMS.py with 100% similarity]
functest/opnfv_tests/vnf/vRNC/parser.py [moved from testcases/vnf/vRNC/parser.py with 100% similarity]
functest/tests/__init__.py [moved from unit_tests/__init__.py with 100% similarity]
functest/tests/unit/__init__.py [moved from unit_tests/core/__init__.py with 100% similarity]
functest/tests/unit/core/__init__.py [moved from unit_tests/odl/__init__.py with 100% similarity]
functest/tests/unit/core/test_base.py [moved from unit_tests/core/test_base.py with 100% similarity]
functest/tests/unit/odl/__init__.py [moved from utils/__init__.py with 100% similarity]
functest/tests/unit/odl/test_odl.py [moved from unit_tests/odl/test_odl.py with 99% similarity]
functest/tests/unit/utils/__init__.py [new file with mode: 0644]
functest/tests/unit/utils/test_utils.py [new file with mode: 0644]
functest/utils/__init__.py [new file with mode: 0644]
functest/utils/functest_logger.py [moved from utils/functest_logger.py with 100% similarity]
functest/utils/functest_utils.py [moved from utils/functest_utils.py with 100% similarity]
functest/utils/functest_vacation.py [moved from utils/functest_vacation.py with 100% similarity]
functest/utils/openstack_clean.py [moved from utils/openstack_clean.py with 100% similarity]
functest/utils/openstack_snapshot.py [moved from utils/openstack_snapshot.py with 100% similarity]
functest/utils/openstack_tacker.py [moved from utils/openstack_tacker.py with 100% similarity]
functest/utils/openstack_utils.py [moved from utils/openstack_utils.py with 100% similarity]
run_unit_tests.sh

index d649767..cca4959 100644 (file)
@@ -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
index 6fdc426..6401800 100755 (executable)
@@ -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."
index 22509e6..afd3298 100644 (file)
@@ -93,7 +93,7 @@ tiers:
                     installer: ''
                     scenario: 'odl'
                 run:
-                    module: 'functest.testcases.Controllers.ODL.OpenDaylightTesting'
+                    module: 'functest.opnfv_tests.Controllers.ODL.OpenDaylightTesting'
                     class: 'ODLTestCases'
 
             -
index 0291c66..42c24ec 100644 (file)
@@ -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
similarity index 100%
rename from __init__.py
rename to functest/__init__.py
similarity index 100%
rename from cli/__init__.py
rename to functest/cli/__init__.py
similarity index 100%
rename from cli/cli_base.py
rename to functest/cli/cli_base.py
similarity index 100%
rename from cli/setup.py
rename to functest/cli/setup.py
similarity index 100%
rename from core/__init__.py
rename to functest/core/__init__.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)
similarity index 99%
rename from testcases/OpenStack/vPing/vping_util.py
rename to functest/opnfv_tests/OpenStack/vPing/vping_util.py
index cf5a28d..ccd9db0 100644 (file)
@@ -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:
similarity index 94%
rename from testcases/features/sfc/prepare_odl_sfc.bash
rename to functest/opnfv_tests/features/sfc/prepare_odl_sfc.bash
index 80ed9bd..c4d8f4f 100755 (executable)
@@ -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 |& \
similarity index 97%
rename from testcases/features/sfc/prepare_odl_sfc.py
rename to functest/opnfv_tests/features/sfc/prepare_odl_sfc.py
index 78f4d76..3d700b8 100755 (executable)
@@ -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} "
similarity index 99%
rename from testcases/features/sfc/sfc.py
rename to functest/opnfv_tests/features/sfc/sfc.py
index 2cc7ac9..17ffef2 100755 (executable)
@@ -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'
similarity index 99%
rename from testcases/features/sfc/sfc_colorado1.py
rename to functest/opnfv_tests/features/sfc/sfc_colorado1.py
index d31541d..6965f28 100755 (executable)
@@ -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)
similarity index 99%
rename from testcases/security_scan/security_scan.py
rename to functest/opnfv_tests/security_scan/security_scan.py
index 98e6b7a..4e0407f 100755 (executable)
@@ -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:
similarity index 99%
rename from unit_tests/odl/test_odl.py
rename to functest/tests/unit/odl/test_odl.py
index cbe4df6..3f33dc8 100644 (file)
@@ -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 (file)
index 0000000..e69de29
diff --git a/functest/tests/unit/utils/test_utils.py b/functest/tests/unit/utils/test_utils.py
new file mode 100644 (file)
index 0000000..36313d2
--- /dev/null
@@ -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 (file)
index 0000000..e69de29
index bbe95cc..e050418 100755 (executable)
@@ -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