From 045119969f18d863e0ba59e71f168db4e7cfebf4 Mon Sep 17 00:00:00 2001 From: Sylvain Baubeau Date: Wed, 10 Jun 2020 12:28:02 +0200 Subject: [PATCH] Add simple test --- tests/run-tests.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 tests/run-tests.sh diff --git a/tests/run-tests.sh b/tests/run-tests.sh new file mode 100755 index 0000000..275736f --- /dev/null +++ b/tests/run-tests.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +helm install --name skydive . + +export UI_PORT=$(kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services skydive-skydive-service) +export UI_IP=$(kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}") + +max_retry=20 +counter=0 +until $command +do + sleep 3 + [[ counter -eq $max_retry ]] && echo "Failed to reach Skydive UI" && exit 1 + echo "Trying again. Try #$counter" + ((counter++)) +done + +helm delete --purge skydive \ No newline at end of file