From 7d81960cd1378627c994fb7cfe0b43213180265d Mon Sep 17 00:00:00 2001 From: Jan Pazdziora Date: Tue, 17 Jul 2018 00:21:52 +0200 Subject: Wait for the HTTP server to start in tests. --- tests/run.sh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/run.sh b/tests/run.sh index 0239907..6986a30 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -3,6 +3,14 @@ set -e set -x +echo "Wait for the HTTP server to start ..." +for i in $( seq 1 10 ) ; do + if curl -s -o /dev/null http://localhost/ ; then + break + fi + sleep 3 +done + echo "Testing Require pam-account" curl -s -D /dev/stdout -o /dev/null http://localhost/authz | tee /dev/stderr | grep 401 curl -u alice:Tajnost -s -D /dev/stdout -o /dev/null http://localhost/authz | tee /dev/stderr | grep 401 -- cgit