From 6dc696f5d6adc6cdfa8dad053cd2def1ce56a025 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Tue, 10 Oct 2017 19:50:44 +0000 Subject: Reduce time spent waiting for spin up The wait times are way too large. I've added similar script used in the docker images to wait for the port to open. Reduced overal time. Fixed API call to get Configs. Should be: ".*" not "*.*" Removed fake policy tests. Issue-ID: POLICY-299 Change-Id: I4076ef8935dd128f1e240202083ce5567e70a67b Signed-off-by: Pamela Dragosh --- test/csit/scripts/policy/wait_for_port.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 test/csit/scripts/policy/wait_for_port.sh (limited to 'test/csit/scripts/policy/wait_for_port.sh') diff --git a/test/csit/scripts/policy/wait_for_port.sh b/test/csit/scripts/policy/wait_for_port.sh new file mode 100755 index 000000000..10f08ded1 --- /dev/null +++ b/test/csit/scripts/policy/wait_for_port.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +if [[ $# -ne 2 ]]; then + echo "Usage: wait-for-port hostname port" >&2 + exit 1 +fi + +host=$1 +port=$2 + +echo "Waiting for $host port $port open" +until telnet $host $port /dev/null | grep -q '^Connected'; do + sleep 1 +done + +echo "$host port $port is open" + +exit 0 -- cgit 1.2.3-korg