summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJan Pazdziora <jpazdziora@redhat.com>2018-07-17 00:21:52 +0200
committerJan Pazdziora <jpazdziora@redhat.com>2018-07-17 00:22:23 +0200
commit7d81960cd1378627c994fb7cfe0b43213180265d (patch)
tree0663f8c477c3d69fc0ed53272785c9012be24ce8 /tests
parent02a147cf6bf9ec8c1b648e97307129333e84a051 (diff)
downloadmod_authnz_pam-7d81960cd1378627c994fb7cfe0b43213180265d.tar.gz
mod_authnz_pam-7d81960cd1378627c994fb7cfe0b43213180265d.tar.xz
mod_authnz_pam-7d81960cd1378627c994fb7cfe0b43213180265d.zip
Wait for the HTTP server to start in tests.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run.sh8
1 files changed, 8 insertions, 0 deletions
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