summaryrefslogtreecommitdiffstats
path: root/tests/run.sh
diff options
context:
space:
mode:
authorJan Pazdziora <jpazdziora@redhat.com>2022-01-23 11:18:56 +0100
committerJan Pazdziora <jpazdziora@redhat.com>2022-01-30 12:08:23 +0100
commit4a3677859d48b8bf693ef71f4084be9ec8709e7b (patch)
tree5a6a0f3cfbeaff188cd494bb1bb48ccb0bf9cfca /tests/run.sh
parentcda71908dbb680b3f34fe7290d3351873416a8ae (diff)
downloadmod_intercept_form_submit-4a3677859d48b8bf693ef71f4084be9ec8709e7b.tar.gz
mod_intercept_form_submit-4a3677859d48b8bf693ef71f4084be9ec8709e7b.tar.xz
mod_intercept_form_submit-4a3677859d48b8bf693ef71f4084be9ec8709e7b.zip
Add test for AuthPAMExpiredRedirect behaviour.
Diffstat (limited to 'tests/run.sh')
-rwxr-xr-xtests/run.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/run.sh b/tests/run.sh
index ef7d240..5360791 100755
--- a/tests/run.sh
+++ b/tests/run.sh
@@ -20,4 +20,10 @@ curl --data 'something=somewhere&password=heslo1&something=else&login=user1' -si
curl --data 'login=user1&password=heslo1' -si http://localhost/auth1r | tee /dev/stderr | grep -F -e 'REMOTE_USER=[user1]' -e 'login=user1&password=[REDACTED]' | wc -l | grep -q 2
curl --data 'something=somewhere&password=heslo1&something=else&login=user1' -si http://localhost/auth1r | tee /dev/stderr | grep -F -e 'REMOTE_USER=[user1]' -e 'something=somewhere&password=[REDACTED]&something=else&login=user1' | wc -l | grep -q 2
+curl --data 'login=user1&password=heslo1' -si http://localhost/auth1s | tee /dev/stderr | grep -F -e 'REMOTE_USER=[user1]' -e 'login=user1&password=[REDACTED]' | wc -l | grep -q 2
+curl --data 'something=somewhere&password=heslo1&something=else&login=user1' -si http://localhost/auth1s | tee /dev/stderr | grep -F -e 'REMOTE_USER=[user1]' -e 'something=somewhere&password=[REDACTED]&something=else&login=user1' | wc -l | grep -q 2
+chage -d $(date -d -2days +%Y-%m-%d) -M 1 user1
+curl --data 'login=user1&password=heslo1' -si http://localhost/auth1s | tee /dev/stderr | grep -F -e 'HTTP/1.1 307 Temporary Redirect' -e 'Location: http://localhost/login?backurl=http%3a%2f%2flocalhost%2fauth1s&uid=user1' | wc -l | grep -q 2
+curl --data 'something=somewhere&password=heslo1&something=else&login=user1' -si http://localhost/auth1s | tee /dev/stderr | grep -F -e 'HTTP/1.1 307 Temporary Redirect' -e 'Location: http://localhost/login?backurl=http%3a%2f%2flocalhost%2fauth1s&uid=user1' | wc -l | grep -q 2
+
echo OK $0.