Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Prerequisites

Do a mvn clean install on both directories to pull down the necessary libraries from the POM.

...

  • ) (windows only)
  • Docker environment (Docker desktop started in windows)
  • Docker image of latest CPS-NCMP  (mvn clean install)
  • Docker image of latest DMI-Plugin  (mvn clean install)

Run CSIT

Navigate to cps/csit directory.

Run the following script

...

Once the scripts have run, the output should look like the following

Disable Tear-down 

As part of this process docker containers are created for cps-and-ncmp, dbpostgresql, ncmp-dmi-plugin, mariadb and sdnc, once the testing is finished these docker containers are stopped and removed.

To prevent these docker containers from being stopped as part of this process for any reason, within the teardown.sh script located in cps/csit/plans/cps comment out the following line.

Potential issues

Local IP address not set

This issue may also appear typically appears when running the scripts from a windows WSL environment

Code Block
languagebash
Error response from daemon: invalid IP address in add-host: ""

To resolve this, do the following:

Issue the following command

Install and run ifconfig

Code Block
languagebash
sudo apt install net-tools
Code Block
languagebash

ifconfig

From the eth0 configuration take the inet address

And manually add this address to the LOCAL_IP variable within the setup.sh script located in the following directory Update the cps/csit/plans/cps/setup.sh to set te IP Address directly instead of extracting it using linux commands that don't work on WSL:

Save this configuration.

Run scripts again.

Port already in use

Another common reason for containers not starting is that the port is already in use.  You might see something like below:

Code Block
languagebash
titlePorts not available
Ports are not available: listen tcp 0.0.0.0:3306: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.

The commands  to check ports usage are:

  • Windows: netstat -aof 
  • Unix (WSL): netstat.exe -an | grep -i "listen" | grep -v "\[::\]" 

Stop and disable any conflicting service using the same port and try again

ModuleNotFoundError (python3 v. python)

If your the tests don't run after doing this, as seen above check for this error.at all check  for ModuleNotFoundError like this:

Code Block
languagebash
/tmp/tmp.rgIeMxiRCGrobot_venv/bin/python: Error while finding module specification for 'robot.run' (ModuleNotFoundError: No module named 'robot')

...

Code Block
languagebash
python3 -m robot.run -N ${TESTPLAN} -v WORKSPACE:/tmp ${ROBOT_VARIABLES} ${TESTOPTIONS} ${SUITES}

Run scripts again

System time out of Sync

If there is further issues downloading libraries due to the system date being out of sync with windows issue the following command and run the scripts again.

...