CoprHD source contains out-of-the-box sanity tests for various components like block controller, file controller and system management. These tests need to be run before contributing a change to ensure the change has not introduced any basic regression. This wiki is intended to provide detailed instructions on how to execute these sanity tests against a CoprHD instance.
Running Sanity Tests
Before Running the Tests
Make sure you have bash shell and python in your environment for running the tests.
The sanity tests are located in CoprHD source under coprhd-controller/tools/tests
- Navigate to the coprhd-controller/tools/tests directory.
Edit the sanity.conf file located under coprhd-controller/tools/tests/conf and add the access details for the hardware or simulators that participate in the test runs.
For example, in the section below, the access and identification details for the VNX box (real hardware) should be provided.
If using simulators for hardware, identify the simulator IP. This may be your own CoprHD development kit if you installed simulators on your devkit. It may be a separate deployment of simulators.
Invoking Sanity Tests
- The main script that will be used to run the tests is called sanity and is found under coprhd-controller/tools/tests
- To invoke the sanity tests, run the script with the following syntax:
sanity conf/sanity.conf <CoprHD IP> <test target>
where <test target> should be selected based on the component for which the code changes are being contributed.
Below are the key test targets to be used to run sanity tests before submitting contributions:
|Test Category||<test target>|
|Basic Sanity with Simulators||quick|
|File Controller Tests|
|VPLEX Controller Tests|
|Block Controller Tests|
|System Management Tests|