From: hno <> Date: Tue, 8 May 2007 05:37:47 +0000 (+0000) Subject: Updated NTLM/Negotiate test clients, explaining a bit of their use. X-Git-Tag: SQUID_3_0_PRE6~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c10de90435c8cc917e62efc12bf5be987daf0853;p=thirdparty%2Fsquid.git Updated NTLM/Negotiate test clients, explaining a bit of their use. Added a trivial Basic auth test helper. --- diff --git a/test-suite/basic_test.sh b/test-suite/basic_test.sh new file mode 100755 index 0000000000..02947eb656 --- /dev/null +++ b/test-suite/basic_test.sh @@ -0,0 +1,12 @@ +#!/bin/sh +while read user password; do +case $password in +UNKNOWN) + echo "ERR Unknown User" + ;; +OK*) echo "OK" + ;; +*) echo "ERR Incorrect Login" + ;; +esac +done diff --git a/test-suite/run_negotiate_test.sh b/test-suite/run_negotiate_test.sh index 1867084764..8e846bea2e 100644 --- a/test-suite/run_negotiate_test.sh +++ b/test-suite/run_negotiate_test.sh @@ -1,6 +1,20 @@ #!/bin/sh +url=$1 +proxy=${2:-localhost} +port=${3:-3128} + +if [ $# -lt 1 ]; then + echo "Usage: $0 URL [server port]" + exit 1 +fi + +echo "blob # partial message" +echo "USER=... # Success" +echo "BAD.. # Login failure" +echo "ERR.. # Failure" + while read auth; do - echo "HEAD http://www.squid-cache.org/ HTTP/1.0" + echo "GET $url HTTP/1.0" if [ -n "$auth" ]; then echo "Proxy-Authorization: Negotiate $auth" fi diff --git a/test-suite/run_ntlm_test.sh b/test-suite/run_ntlm_test.sh index 4b7212b124..14a263cc4d 100644 --- a/test-suite/run_ntlm_test.sh +++ b/test-suite/run_ntlm_test.sh @@ -1,9 +1,23 @@ #!/bin/sh +url=$1 +proxy=${2:-localhost} +port=${3:-3128} + +if [ $# -lt 1 ]; then + echo "Usage: $0 URL [server port]" + exit 1 +fi + +echo "blob # partial message" +echo "USER=... # Success" +echo "BAD.. # Login failure" +echo "ERR.. # Failure" + while read auth; do - echo "HEAD http://www.squid-cache.org/ HTTP/1.0" + echo "GET $url HTTP/1.0" if [ -n "$auth" ]; then echo "Proxy-Authorization: NTLM $auth" fi echo "Proxy-Connection: keep-alive" echo -done | tee -a /dev/fd/2 | nc localhost 3128 +done | tee -a /dev/fd/2 | nc $proxy $port