Add PONSim test scripts for running SIAB
[iec.git] / src / use_cases / seba_on_arm / test / ponsim / docker_run.sh
1 #!/bin/bash
2
3 set -ex
4
5 CORD_REPO="${CORD_REPO:-https://github.com/opencord/cord-tester.git}"
6 CORD_REV="cord-6.1"
7 VOLTHA_REPO="${VOLTHA_REPO:-https://github.com/opencord/voltha.git}"
8 VOLTHA_REV="master"
9 K8S_MASTER_IP="${K8S_MASTER_IP:-127.0.0.1}"
10 KUBE_DIR="${KUBE_DIR:-/workspace/.kube}"
11 USER="${USER:-ubuntu}"
12
13 # The ssh server must be running since cord-tester tries to connect
14 # to localhost
15 sudo /etc/init.d/ssh restart
16 cd "${HOME}"
17 sudo cp -r "${KUBE_DIR}" .kube
18 sudo chown -R "$(id -u)":"$(id -g)" .kube
19
20 git clone "${CORD_REPO}" cord-tester -b "${CORD_REV}"
21 git clone "${VOLTHA_REPO}" voltha -b "${VOLTHA_REV}"
22
23 cd cord-tester/src/test/cord-api
24 ./setup_venv.sh
25 # shellcheck disable=SC1091
26 source venv-cord-tester/bin/activate
27 # As per documentation, we set the SERVER_IP before anything
28 sed -i "s/SERVER_IP.*=.*'/SERVER_IP = '${K8S_MASTER_IP}'/g" \
29      Properties/RestApiProperties.py
30 cd Tests/WorkflowValidations/
31
32 export SERVER_IP="${K8S_MASTER_IP}"
33
34 robot -v ONU_STATE_VAR:onu_state --removekeywords wuks -e notready \
35       -i stable -v "VOLTHA_DIR:${HOME}/voltha" SIAB.robot