aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2017-10-23 15:15:52 -0700
committerGary Wu <gary.i.wu@huawei.com>2017-10-23 15:15:52 -0700
commit73202cf0facf5fdd0def24452c4781aec8b2711c (patch)
tree649a52365fa01e086863b21a7ebb440d3193d7b6
parent838c34d02bcc34576dc660058a2beb08add8f334 (diff)
Add script for health check job
Change-Id: I524853bd26fb104dd787a0e3ae6a8e9ae6acc5db Issue-ID: INT-278 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
-rwxr-xr-xtest/ete/scripts/remote/run-robot.sh18
-rwxr-xr-xtest/ete/scripts/run-healthcheck.sh12
2 files changed, 30 insertions, 0 deletions
diff --git a/test/ete/scripts/remote/run-robot.sh b/test/ete/scripts/remote/run-robot.sh
new file mode 100755
index 000000000..ff7223a17
--- /dev/null
+++ b/test/ete/scripts/remote/run-robot.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+cd /opt
+
+if [ ! -x /opt/demo.sh ]; then
+ echo "Robot VM not initialized"
+ exit 2
+fi
+
+if [ ! -d eteshare/logs/demo ]; then
+ echo "09d8566ea45e43aa974cf447ed591d77" > /opt/config/openstack_tenant_id.txt
+ echo "gary_wu" > /opt/config/openstack_username.txt
+ echo $OS_PASSWORD_INPUT > /opt/config/openstack_password.txt
+ /bin/bash /opt/eteshare/config/vm_config2robot.sh
+ echo "test" | /opt/demo.sh init_robot
+fi
+
+/opt/ete.sh health
diff --git a/test/ete/scripts/run-healthcheck.sh b/test/ete/scripts/run-healthcheck.sh
new file mode 100755
index 000000000..a6bd489e8
--- /dev/null
+++ b/test/ete/scripts/run-healthcheck.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+if [ -z "$WORKSPACE" ]; then
+ export WORKSPACE=`git rev-parse --show-toplevel`
+fi
+
+cd $WORKSPACE/test/ete/scripts
+
+ROBOT_IP=$(./get-floating-ip.sh onap-robot)
+echo "ROBOT_IP=${ROBOT_IP}"
+
+ssh -o StrictHostKeychecking=no -i ~/.ssh/onap_key root@${ROBOT_IP} "OS_PASSWORD_INPUT=$OS_PASSWORD_INPUT bash -s" < ./remote/run-robot.sh