Modified the Readme for Unit Test Execution Instructions
Change-Id: Ib7ff79c166e34c4f99a8df55feb0191f37555597 Removed the trailing whitespaces in the README Change-Id: Ic2299bf35d9e0d8512ae4f57976884d12ba92159
This commit is contained in:
parent
bb6cbb09f5
commit
2184460b65
@ -377,52 +377,54 @@ How to test the installation
|
|||||||
----------------------------
|
----------------------------
|
||||||
The unit tests are located at quantum/plugins/cisco/tests/unit. They can be
|
The unit tests are located at quantum/plugins/cisco/tests/unit. They can be
|
||||||
executed from the main folder using the run_tests.sh or to get a more detailed
|
executed from the main folder using the run_tests.sh or to get a more detailed
|
||||||
result the quantum/plugins/cisco/run_tests.py script.
|
result the run_tests.py script.
|
||||||
|
|
||||||
1. Testing the core API (without UCS/Nexus/RHEL hardware, and can be run on
|
1. All unit tests (needs environment setup as indicated in the pre-requisites):
|
||||||
|
|
||||||
|
./run_tests.sh -N quantum.plugins.cisco.tests.unit
|
||||||
|
|
||||||
|
or by modifying the environment variable to point to the plugin directory
|
||||||
|
|
||||||
|
In bash : export PLUGIN_DIR=quantum/plugins/cisco
|
||||||
|
tcsh/csh : setenv PLUGIN_DIR quantum/plugins/cisco
|
||||||
|
|
||||||
|
./run_tests.sh -N
|
||||||
|
|
||||||
|
Another option is to execute the python script run_tests.py
|
||||||
|
|
||||||
|
python run_tests.py quantum.plugins.cisco.tests.unit
|
||||||
|
|
||||||
|
2. Testing the core API (without UCS/Nexus/RHEL hardware, and can be run on
|
||||||
Ubuntu):
|
Ubuntu):
|
||||||
First disable all device-specific plugins by commenting out the entries in:
|
Device-specific plugins can be disabled by commenting out the entries in:
|
||||||
quantum/plugins/cisco/conf/plugins.ini
|
etc/quantum/plugins/cisco/cisco_plugins.ini
|
||||||
Then run the test script:
|
The Core API can be tested by initially disabling all device plugins, then
|
||||||
|
enabling just the UCS plugins, and finally enabling both the UCS and the
|
||||||
|
Nexus plugins.
|
||||||
|
Execute the test script as follows:
|
||||||
|
|
||||||
Set the environment variable PLUGIN_DIR to the location of the plugin
|
./run_tests.sh -N quantum.plugins.cisco.tests.unit.test_l2networkApi
|
||||||
directory. This is manadatory if the run_tests.sh script is used.
|
|
||||||
|
|
||||||
In bash : export PLUGIN_DIR=quantum/plugins/cisco
|
|
||||||
tcsh/csh : setenv PLUGIN_DIR quantum/plugins/cisco
|
|
||||||
./run_tests.sh quantum.plugins.cisco.tests.unit.test_l2networkApi
|
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
python quantum/plugins/cisco/run_tests.py
|
python run_tests.py quantum.plugins.cisco.tests.unit.test_l2networkApi
|
||||||
quantum.plugins.cisco.tests.unit.test_l2networkApi
|
|
||||||
|
|
||||||
2. Specific Plugin unit test (needs environment setup as indicated in the
|
3. Specific Plugin unit test (needs environment setup as indicated in the
|
||||||
pre-requisites):
|
pre-requisites):
|
||||||
|
|
||||||
In bash : export PLUGIN_DIR=quantum/plugins/cisco
|
./run_tests.sh -N quantum.plugins.cisco.tests.unit.<name_of_the file>
|
||||||
tcsh/csh : setenv PLUGIN_DIR quantum/plugins/cisco
|
|
||||||
./run_tests.sh quantum.plugins.cisco.tests.unit.<name_of_the file>
|
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
python <path to the plugin directory>/run_tests.py
|
python run_tests.py quantum.plugins.cisco.tests.unit.<name_of_the file>
|
||||||
quantum.plugins.cisco.tests.unit.<name_of_the file>
|
|
||||||
E.g.:
|
E.g.:
|
||||||
|
|
||||||
python quantum/plugins/cisco/run_tests.py
|
python run_tests.py quantum.plugins.cisco.tests.unit.test_ucs_plugin
|
||||||
quantum.plugins.cisco.tests.unit.test_ucs_plugin
|
|
||||||
|
|
||||||
3. All unit tests (needs environment setup as indicated in the pre-requisites):
|
To run specific tests, use the following:
|
||||||
|
python run_tests.py
|
||||||
In bash : export PLUGIN_DIR=quantum/plugins/cisco
|
quantum.plugins.cisco.tests.unit.<name_of_the file>:<ClassName>.<funcName>
|
||||||
tcsh/csh : setenv PLUGIN_DIR quantum/plugins/cisco
|
|
||||||
|
|
||||||
./run_tests.sh quantum.plugins.cisco.tests.unit
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
python quantum/plugins/cisco/run_tests.py quantum.plugins.cisco.tests.unit
|
|
||||||
|
|
||||||
4. Testing the Extension API
|
4. Testing the Extension API
|
||||||
The script is placed alongwith the other cisco unit tests. The location may
|
The script is placed alongwith the other cisco unit tests. The location may
|
||||||
@ -430,15 +432,12 @@ result the quantum/plugins/cisco/run_tests.py script.
|
|||||||
Location quantum/plugins/cisco/tests/unit/test_cisco_extension.py
|
Location quantum/plugins/cisco/tests/unit/test_cisco_extension.py
|
||||||
|
|
||||||
The script can be executed by :
|
The script can be executed by :
|
||||||
./run_tests.sh quantum.plugins.cisco.tests.unit.test_cisco_extension
|
./run_tests.sh -N quantum.plugins.cisco.tests.unit.test_cisco_extension
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
python run_tests.py quantum.plugins.cisco.tests.unit.test_cisco_extension
|
python run_tests.py quantum.plugins.cisco.tests.unit.test_cisco_extension
|
||||||
|
|
||||||
To run specific tests
|
|
||||||
python run_tests.py
|
|
||||||
quantum.plugins.cisco.tests.unit.test_cisco_extension:<ClassName>.<funcName>
|
|
||||||
|
|
||||||
Bingo bango bongo! That's it! Thanks for taking the leap into Quantum.
|
Bingo bango bongo! That's it! Thanks for taking the leap into Quantum.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user