aboutsummaryrefslogtreecommitdiffstats
path: root/test/ete/scripts/run-healthcheck.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/ete/scripts/run-healthcheck.sh')
-rwxr-xr-xtest/ete/scripts/run-healthcheck.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/ete/scripts/run-healthcheck.sh b/test/ete/scripts/run-healthcheck.sh
index 1555dad85..2f0f014d3 100755
--- a/test/ete/scripts/run-healthcheck.sh
+++ b/test/ete/scripts/run-healthcheck.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -x
SSH_KEY=~/.ssh/onap_key
@@ -13,10 +13,14 @@ cd $WORKSPACE/test/ete/scripts
ROBOT_IP=$(./get-floating-ip.sh onap-robot)
echo "ROBOT_IP=${ROBOT_IP}"
-# allow direct login as root
-ssh -o StrictHostKeychecking=no -i ${SSH_KEY} ubuntu@${ROBOT_IP} 'sudo cp /home/ubuntu/.ssh/authorized_keys /root/.ssh/'
+if [ "" == "${ROBOT_IP}" ]; then
+ exit 1
+fi
+
+ssh-keygen -R ${ROBOT_IP}
+
+ssh -o StrictHostKeychecking=no -i ${SSH_KEY} root@${ROBOT_IP} "OS_PROJECT_ID=$OS_PROJECT_ID OS_USERNAME=$OS_USERNAME OS_PASSWORD=$OS_PASSWORD bash -s" < ./remote/run-robot.sh
-ssh -o StrictHostKeychecking=no -i ${SSH_KEY} root@${ROBOT_IP} "OS_PASSWORD_INPUT=$OS_PASSWORD_INPUT bash -s" < ./remote/run-robot.sh
LOG_DIR=$(ssh -o StrictHostKeychecking=no -i ${SSH_KEY} root@${ROBOT_IP} "ls -1t /opt/eteshare/logs | head -1")
echo "Browse Robot results at http://${ROBOT_IP}:88/logs/${LOG_DIR}/"
rsync -e "ssh -i ${SSH_KEY}" -avPz root@${ROBOT_IP}:/opt/eteshare/logs/${LOG_DIR}/ $WORKSPACE/archives/