Testing CLAMP



This page is Work in Progress

See also TOSCA Control Loop Test Picture

Running CLAMP ControlLoop CSIT

  1. Docker images can be build and pushed to nexus using steps in Building and running CLAMP
    Once the docker images are built and available in nexus or localhost (for local verification), following are the steps and results of CLAMP CSIT

    Clone policy docker repo where CSITs reside

    $git clone "https://gerrit.onap.org/r/policy/docker"



  2. Open a console and go into the directory docker/csit/

    $cd docker/csit/ $./run-project-csit.sh clamp

    Above script will perform following operations :

  • Pull the clamp docker images from nexus docker registry

  • Bring up all the docker images

  • Assign IP address and bring up the exposed ports

  • Run integration tests, return the test results

  • Teardown entire setup by stopping and removing the docker images

  • Save the logs and reports (log.html, output.xml, report.html) in docker/csit

Developer details on the CLAMP CSIT procedure

  1. setup.sh script in $/docker/csit/clamp/plans is responsible for sourcing all required configuration such as versions, IP-Addresses, Port info etc

    It internally calls following docker-compose command to bring up docker instances. It also sets Robot variables needed for running Robot tests.

    $docker-compose -f ${SCRIPTS}/docker-compose-all.yml up -d policy-controlloop-runtime



  2. For establishing a basic ControlLoop, a controlloop runtime component (policy-clamp-cl-runtime), different participants (policy-clamp-cl-pf-ppnt, policy-clamp-cl-k8s-ppnt), Dmaap simulator for communication between components (simulator), mariadb for storage of controlloop data are needed (mariadb) are needed. policy-api docker image is needed for interaction of policy-participant with policy-framework.



  3. CLAMP CSIT testcases for ControlLoop are present in policy-clamp-test.robot under $docker/csit/clamp/tests
    There is a testplan.txt under docker/csit/clamp/plans/ which is read for identifying the testcases.
    Robot testcases establish a basic controlloop by communicating between different components (or docker images) with REST APIs and Dmaap

  4. teardown.sh script in $/docker/csit/clamp/plans is responsible for stopping and removing docker images



  5. Report and log after CSIT execution are stored in $docker/csit