From 3e3c96b2aa15d7757f281ce00518a67e2a1225a9 Mon Sep 17 00:00:00 2001 From: helenyao Date: Mon, 21 Nov 2016 06:50:06 -0500 Subject: Extracted all global parameters into functest_constants.py JIRA: FUNCTEST-533 1. Extracted all global variables into functest_constants.py and updated all affected areas accordingly 2. Used os.path.join to replace '/' to come up with the path for better cross-platform support and improve the path accuracy 3. Removed unused variables 4. Updated the hardcoded path in Dockerfile by using variable reference 5. Removed "/" ending from all path variables 6. Updated the unit test Change-Id: Ib30a81d1f0c83fbaef042d63c187c27bd18301bb Signed-off-by: helenyao --- docs/configguide/configguide.rst | 2 +- docs/devguide/index.rst | 2 +- docs/userguide/runfunctest.rst | 8 ++++---- docs/userguide/troubleshooting.rst | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'docs') diff --git a/docs/configguide/configguide.rst b/docs/configguide/configguide.rst index 4ef673c94..ea5b01ea6 100644 --- a/docs/configguide/configguide.rst +++ b/docs/configguide/configguide.rst @@ -74,7 +74,7 @@ executing the following sequence #. Log in to container and execute the following command. Replace the IP with installer address after the "-a" parameter:: - $repos_dir/releng/utils/fetch_os_creds.sh \ + $REPOS_DIR/releng/utils/fetch_os_creds.sh \ -d /home/opnfv/functest/conf/openstack.creds \ -i fuel \ -a 10.20.0.2 \ diff --git a/docs/devguide/index.rst b/docs/devguide/index.rst index cab9ec33c..6b3e1f0e6 100644 --- a/docs/devguide/index.rst +++ b/docs/devguide/index.rst @@ -785,7 +785,7 @@ Dockerfile This file lists the repositories (internal or external) to be cloned in the Functest container. You can also add external packages:: - RUN git clone https://gerrit.opnfv.org/gerrit/ ${repos_dir}/ + RUN git clone https://gerrit.opnfv.org/gerrit/ ${REPOS_DIR}/ testcases.yaml -------------- diff --git a/docs/userguide/runfunctest.rst b/docs/userguide/runfunctest.rst index f3da540a4..a6a2c1756 100644 --- a/docs/userguide/runfunctest.rst +++ b/docs/userguide/runfunctest.rst @@ -264,13 +264,13 @@ Example:: Functest includes a cleaning mechanism in order to remove all the OpenStack resources except those present before running any test. The script -*$repos_dir/functest/utils/generate_defaults.py* is called once when setting up +*$REPOS_DIR/functest/functest/utils/generate_defaults.py* is called once when setting up the Functest environment (i.e. CLI command 'functest env prepare') to snapshot all the OpenStack resources (images, networks, volumes, security groups, tenants, users) so that an eventual cleanup does not remove any of these defaults. The script **clean_openstack.py** which is located in -*$repos_dir/functest/utils/* is normally called after a test execution. It is +*$REPOS_DIR/functest/functest/utils/* is normally called after a test execution. It is in charge of cleaning the OpenStack resources that are not specified in the defaults file generated previously which is stored in */home/opnfv/functest/conf/os_defaults.yaml* in the Functest docker container. @@ -289,7 +289,7 @@ full Functest execution. Although the Functest CLI provides an easy way to run any test, it is possible to do a direct call to the desired test script. For example: - python $repos_dir/functest/testcases/OpenStack/vPing/vPing_ssh.py -d + python $REPOS_DIR/functest/functest/opnfv_tests/OpenStack/vPing/vPing_ssh.py -d Automated testing @@ -325,7 +325,7 @@ variables: * mode = (ha|noha) The constraints per test case are defined in the Functest configuration file -*/home/opnfv/repos/functest/ci/testcases.yaml*:: +*/home/opnfv/repos/functest/functest/ci/testcases.yaml*:: tiers: - diff --git a/docs/userguide/troubleshooting.rst b/docs/userguide/troubleshooting.rst index dbbcc5d69..bf94935e6 100644 --- a/docs/userguide/troubleshooting.rst +++ b/docs/userguide/troubleshooting.rst @@ -44,8 +44,8 @@ These test cases can be run inside the container, using new Functest CLI as foll The Functest CLI is designed to route a call to the corresponding internal python scripts, located in paths: -*$repos_dir/functest/testcases/vPing/CI/libraries/vPing_ssh.py* and -*$repos_dir/functest/testcases/vPing/CI/libraries/vPing_userdata.py* +*$REPOS_DIR/functest/functest/opnfv_tests/vPing/CI/libraries/vPing_ssh.py* and +*$REPOS_DIR/functest/functest/opnfv_tests/vPing/CI/libraries/vPing_userdata.py* Notes: #. In this Colorado Funtest Userguide, the use of the Functest CLI is @@ -125,7 +125,7 @@ This test case creates a floating IP on the external network and assigns it to the second instance **opnfv-vping-2**. The purpose of this is to establish a SSH connection to that instance and SCP a script that will ping the first instance. This script is located in the repository under -*$repos_dir/functest/testcases/OpenStack/vPing/ping.sh* and takes an IP as +*$REPOS_DIR/functest/functest/opnfv_tests/OpenStack/vPing/ping.sh* and takes an IP as a parameter. When the SCP is completed, the test will do an SSH call to that script inside the second instance. Some problems can happen here:: @@ -263,7 +263,7 @@ lead to errors in Rally as well. It is possible to run only one Rally scenario, instead of the whole suite. To do that, call the alternative python script as follows:: - python $repos_dir/functest/testcases/OpenStack/rally/run_rally-cert.py -h + python $REPOS_DIR/functest/functest/opnfv_tests/OpenStack/rally/run_rally-cert.py -h usage: run_rally-cert.py [-h] [-d] [-r] [-s] [-v] [-n] test_name positional arguments: @@ -282,7 +282,7 @@ To do that, call the alternative python script as follows:: For example, to run the Glance scenario with debug information:: - python $repos_dir/functest/testcases/OpenStack/rally/run_rally-cert.py -d glance + python $REPOS_DIR/functest/functest/opnfv_tests/OpenStack/rally/run_rally-cert.py -d glance Possible scenarios are: * authenticate @@ -297,7 +297,7 @@ Possible scenarios are: * vm To know more about what those scenarios are doing, they are defined in directory: -*$repos_dir/functest/testcases/OpenStack/rally/scenario* +*$REPOS_DIR/functest/functest/opnfv_tests/OpenStack/rally/scenario* For more info about Rally scenario definition please refer to the Rally official documentation. `[3]`_ -- cgit 1.2.3-korg