2 ##############################################################################
3 # Copyright (c) 2020 Akraino IEC Team.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
12 CORD_REPO="${CORD_REPO:-https://github.com/iecedge/cord-tester.git}"
13 CORD_REV="cord-7.0-arm64"
14 VOLTHA_REPO="${VOLTHA_REPO:-https://github.com/opencord/voltha.git}"
16 K8S_MASTER_IP="${K8S_MASTER_IP:-127.0.0.1}"
17 KUBE_DIR="${KUBE_DIR:-/workspace/.kube}"
18 TEST_USER="${TEST_USER:-ubuntu}"
20 # The ssh server must be running since cord-tester does ssh to localhost
22 sudo apt-get install httpie -y
23 sudo apt-get install jq -y
24 sudo /etc/init.d/ssh restart
25 ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa 2>/dev/null <<< y >/dev/null
26 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
27 # Make sure ssh localhost works with no interruption
28 ssh-keyscan -H localhost >> ~/.ssh/known_hosts
30 sudo cp -r "${KUBE_DIR}" .kube
31 sudo chown -R "$(id -u)":"$(id -g)" .kube
33 git clone "${CORD_REPO}" cord-tester -b "${CORD_REV}"
34 git clone "${VOLTHA_REPO}" voltha -b "${VOLTHA_REV}"
39 # shellcheck disable=SC1091
40 source venv_cord/bin/activate
42 # As per documentation, we set the SERVER_IP before anything
43 sed -i "s/SERVER_IP.*=.*'/SERVER_IP = '${K8S_MASTER_IP}'/g" \
44 Properties/RestApiProperties.py
45 cd Tests/WorkflowValidations/
47 export SERVER_IP="${K8S_MASTER_IP}"
50 PYBOT_ARGS="-v SUBSCRIBER_FILENAME:SIABSubscriberLatest \
51 -v WHITELIST_FILENAME:SIABWhitelistLatest \
52 -v OLT_DEVICE_FILENAME:SIABOLT0Device \
53 -r /workspace/results/report.html \
54 -l /workspace/results/log.html \
55 -o /workspace/results/output.xml"
57 --removekeywords wuks \
60 -v VOLTHA_DIR:${HOME}/voltha SIAB.robot