diff options
author | helenyao <yaohelan@huawei.com> | 2016-11-21 06:50:06 -0500 |
---|---|---|
committer | jose.lausuch <jose.lausuch@ericsson.com> | 2016-11-24 15:14:45 +0100 |
commit | 3e3c96b2aa15d7757f281ce00518a67e2a1225a9 (patch) | |
tree | 9b15e0ceab33a9301ca7cde1a0a36e05f2347584 /docs | |
parent | 7a776398ef8b17bd9af5367d712707a903c1c86a (diff) |
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 <yaohelan@huawei.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/configguide/configguide.rst | 2 | ||||
-rw-r--r-- | docs/devguide/index.rst | 2 | ||||
-rw-r--r-- | docs/userguide/runfunctest.rst | 8 | ||||
-rw-r--r-- | docs/userguide/troubleshooting.rst | 12 |
4 files changed, 12 insertions, 12 deletions
diff --git a/docs/configguide/configguide.rst b/docs/configguide/configguide.rst index 4ef673c9..ea5b01ea 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 cab9ec33..6b3e1f0e 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/<your project> ${repos_dir}/<your project> + RUN git clone https://gerrit.opnfv.org/gerrit/<your project> ${REPOS_DIR}/<your project> testcases.yaml -------------- diff --git a/docs/userguide/runfunctest.rst b/docs/userguide/runfunctest.rst index f3da540a..a6a2c175 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 dbbcc5d6..bf94935e 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]`_ |