diff options
author | Jake Chen <jakechenTW@gmail.com> | 2020-06-18 13:05:28 +0800 |
---|---|---|
committer | Jan Pazdziora <jpazdziora@redhat.com> | 2020-07-08 23:14:59 +0200 |
commit | a9b23ffac32c9ac3b4fac1f60658d3b08b0c93e3 (patch) | |
tree | 695beba0c908ba2bc451825870b7f445267863bc /tests/run.sh | |
parent | 3f25ee81d6730e15db5bee68361a290c2a42a45d (diff) | |
download | mod_authnz_pam-a9b23ffac32c9ac3b4fac1f60658d3b08b0c93e3.tar.gz mod_authnz_pam-a9b23ffac32c9ac3b4fac1f60658d3b08b0c93e3.tar.xz mod_authnz_pam-a9b23ffac32c9ac3b4fac1f60658d3b08b0c93e3.zip |
Harden the test, show that auth is not enough and that account is run.
Diffstat (limited to 'tests/run.sh')
-rwxr-xr-x | tests/run.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/run.sh b/tests/run.sh index a1cbbab..5a2e291 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -16,7 +16,7 @@ rm -f /etc/pam-auth/* 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 -touch /etc/pam-auth/alice +touch /etc/pam-account/alice curl -u alice:Tajnost -s http://localhost/authz | tee /dev/stderr | grep 'User alice' echo "Testing AuthBasicProvider PAM" @@ -25,6 +25,8 @@ curl -u bob:Secret -s -D /dev/stdout -o /dev/null http://localhost/authn | tee / touch /etc/pam-auth/bob curl -u bob:Secret -s -D /dev/stdout -o /dev/null http://localhost/authn | tee /dev/stderr | grep 401 echo Secret > /etc/pam-auth/bob +curl -u bob:Secret -s -D /dev/stdout -o /dev/null http://localhost/authn | tee /dev/stderr | grep 401 +touch /etc/pam-account/bob curl -u bob:Secret -s http://localhost/authn | tee /dev/stderr | grep 'User bob' echo Secret2 > /etc/pam-auth/bob curl -u bob:Secret -s -D /dev/stdout -o /dev/null http://localhost/authn | tee /dev/stderr | grep 401 |