----------------------------\r
The unit tests are located at quantum/plugins/cisco/tests/unit. They can be\r
executed from the main folder using the run_tests.sh or to get a more detailed\r
-result the quantum/plugins/cisco/run_tests.py script.\r
+result the run_tests.py script.\r
\r
-1. Testing the core API (without UCS/Nexus/RHEL hardware, and can be run on\r
- Ubuntu):\r
- First disable all device-specific plugins by commenting out the entries in:\r
- quantum/plugins/cisco/conf/plugins.ini\r
- Then run the test script:\r
+1. All unit tests (needs environment setup as indicated in the pre-requisites):\r
+\r
+ ./run_tests.sh -N quantum.plugins.cisco.tests.unit\r
+\r
+ or by modifying the environment variable to point to the plugin directory\r
\r
- Set the environment variable PLUGIN_DIR to the location of the plugin \r
- directory. This is manadatory if the run_tests.sh script is used.\r
+ In bash : export PLUGIN_DIR=quantum/plugins/cisco\r
+ tcsh/csh : setenv PLUGIN_DIR quantum/plugins/cisco\r
\r
- In bash : export PLUGIN_DIR=quantum/plugins/cisco\r
- tcsh/csh : setenv PLUGIN_DIR quantum/plugins/cisco\r
- ./run_tests.sh quantum.plugins.cisco.tests.unit.test_l2networkApi\r
+ ./run_tests.sh -N\r
+\r
+ Another option is to execute the python script run_tests.py\r
+\r
+ python run_tests.py quantum.plugins.cisco.tests.unit\r
+\r
+2. Testing the core API (without UCS/Nexus/RHEL hardware, and can be run on\r
+ Ubuntu):\r
+ Device-specific plugins can be disabled by commenting out the entries in:\r
+ etc/quantum/plugins/cisco/cisco_plugins.ini\r
+ The Core API can be tested by initially disabling all device plugins, then\r
+ enabling just the UCS plugins, and finally enabling both the UCS and the\r
+ Nexus plugins.\r
+ Execute the test script as follows:\r
+\r
+ ./run_tests.sh -N quantum.plugins.cisco.tests.unit.test_l2networkApi\r
\r
or\r
\r
- python quantum/plugins/cisco/run_tests.py \r
- quantum.plugins.cisco.tests.unit.test_l2networkApi\r
+ python run_tests.py quantum.plugins.cisco.tests.unit.test_l2networkApi\r
\r
-2. Specific Plugin unit test (needs environment setup as indicated in the \r
+3. Specific Plugin unit test (needs environment setup as indicated in the\r
pre-requisites):\r
\r
- In bash : export PLUGIN_DIR=quantum/plugins/cisco\r
- tcsh/csh : setenv PLUGIN_DIR quantum/plugins/cisco\r
- ./run_tests.sh quantum.plugins.cisco.tests.unit.<name_of_the file>\r
+ ./run_tests.sh -N quantum.plugins.cisco.tests.unit.<name_of_the file>\r
\r
- or \r
+ or\r
\r
- python <path to the plugin directory>/run_tests.py \r
- quantum.plugins.cisco.tests.unit.<name_of_the file>\r
+ python run_tests.py quantum.plugins.cisco.tests.unit.<name_of_the file>\r
E.g.:\r
\r
- python quantum/plugins/cisco/run_tests.py \r
- quantum.plugins.cisco.tests.unit.test_ucs_plugin\r
-\r
-3. All unit tests (needs environment setup as indicated in the pre-requisites):\r
- \r
- In bash : export PLUGIN_DIR=quantum/plugins/cisco\r
- tcsh/csh : setenv PLUGIN_DIR quantum/plugins/cisco\r
-\r
- ./run_tests.sh quantum.plugins.cisco.tests.unit\r
+ python run_tests.py quantum.plugins.cisco.tests.unit.test_ucs_plugin\r
\r
- or \r
+ To run specific tests, use the following:\r
+ python run_tests.py\r
+ quantum.plugins.cisco.tests.unit.<name_of_the file>:<ClassName>.<funcName>\r
\r
- python quantum/plugins/cisco/run_tests.py quantum.plugins.cisco.tests.unit\r
\r
4. Testing the Extension API\r
The script is placed alongwith the other cisco unit tests. The location may\r
Location quantum/plugins/cisco/tests/unit/test_cisco_extension.py\r
\r
The script can be executed by :\r
- ./run_tests.sh quantum.plugins.cisco.tests.unit.test_cisco_extension\r
+ ./run_tests.sh -N quantum.plugins.cisco.tests.unit.test_cisco_extension\r
\r
or\r
\r
python run_tests.py quantum.plugins.cisco.tests.unit.test_cisco_extension\r
\r
- To run specific tests\r
- python run_tests.py \r
- quantum.plugins.cisco.tests.unit.test_cisco_extension:<ClassName>.<funcName>\r
\r
Bingo bango bongo! That's it! Thanks for taking the leap into Quantum.\r
\r