Skip to end of metadata
Go to start of metadata

Overview

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

  • Build your private branch that contains the code changes you wish to contribute and deploy the build.

  • 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.

    #
    # VNX file device configuration
    #
    # Provide IP Address, Port,SMIS IP address,SMIS port,storage IP interfaces, User name, Password and Serial no for VNX file device
    VNXF_IP=X.X.X.X
    VNXF_PORT=443
    VNXF_SMIS_IP=X.X.X.X
    VNXF_SMIS_PORT=5989
    VNXF_IP_ENDPOINT1=X.X.X.X
    VNXF_IP_ENDPOINT2=X.X.X.X
    VNXF_USER=nasadmin
    VNXF_PW=xxxxxxxx
    VNXF_SN=APM00123456789
  • 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.

  • HW_SIMULATOR_IP=X.X.X.X

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 Simulatorsquick
File Controller Tests

isilon

netapp

netappc

datadomainfile

vnxfile

vnxe

VPLEX Controller Tests

vplex

vplexexport

Block Controller Tests

vmaxblock

hds

xtremio

vnxblock

RecoverPoint Tests

rpvplex

recoverpoint

System Management Tests

syssvc

Security Tests

security

Infrastructure Testsbackuprestore
  • No labels