diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2019-03-10 10:09:11 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-03-10 14:26:12 +0000 |
commit | 547f8f9c330476a0477db0a3832f10a3b7137439 (patch) | |
tree | de916514d1c2085512a5062289615849ee36c17e | |
parent | dc44627360de8d9fda153581618bbbbcc5176b13 (diff) | |
download | libgit2-547f8f9c330476a0477db0a3832f10a3b7137439.tar.gz |
proxy: add an NTLM test
Start our test proxy on two ports - 8080 which requires HTTP Basic
authentication and 8090 which requires NTLM authentication.
-rw-r--r-- | ci/test.ps1 | 21 | ||||
-rwxr-xr-x | ci/test.sh | 23 |
2 files changed, 34 insertions, 10 deletions
diff --git a/ci/test.ps1 b/ci/test.ps1 index 06e0ab228..754f9a0e4 100644 --- a/ci/test.ps1 +++ b/ci/test.ps1 @@ -40,8 +40,9 @@ Write-Host "#################################################################### if (-not $Env:SKIP_PROXY_TESTS) { Write-Host "" Write-Host "Starting HTTP proxy..." - Invoke-WebRequest -Method GET -Uri https://github.com/ethomson/poxyproxy/releases/download/v0.4.0/poxyproxy-0.4.0.jar -OutFile poxyproxy.jar - javaw -jar poxyproxy.jar -d --port 8080 --credentials foo:bar --quiet + Invoke-WebRequest -Method GET -Uri https://github.com/ethomson/poxyproxy/releases/download/v0.5.0/poxyproxy-0.5.0.jar -OutFile poxyproxy.jar + javaw -jar poxyproxy.jar --port 8080 --credentials basic_foo:basic_bar --auth-type basic --quiet + javaw -jar poxyproxy.jar --port 8090 --credentials ntlm_foo:ntlm_bar --auth-type ntlm --quiet } Write-Host "" @@ -76,14 +77,24 @@ if (-not $Env:SKIP_ONLINE_TESTS) { } if (-not $Env:SKIP_PROXY_TESTS) { + # Run against the Basic authenticating proxy Write-Host "" - Write-Host "Running proxy tests" + Write-Host "Running proxy tests (Basic authentication)" Write-Host "" $Env:GITTEST_REMOTE_PROXY_HOST="localhost:8080" - $Env:GITTEST_REMOTE_PROXY_USER="foo" - $Env:GITTEST_REMOTE_PROXY_PASS="bar" + $Env:GITTEST_REMOTE_PROXY_USER="basic_foo" + $Env:GITTEST_REMOTE_PROXY_PASS="basic_bar" + run_test proxy + + # Run against the NTLM authenticating proxy + Write-Host "" + Write-Host "Running proxy tests (NTLM authentication)" + Write-Host "" + $Env:GITTEST_REMOTE_PROXY_HOST="localhost:8090" + $Env:GITTEST_REMOTE_PROXY_USER="ntlm_foo" + $Env:GITTEST_REMOTE_PROXY_PASS="ntlm_bar" run_test proxy $Env:GITTEST_REMOTE_PROXY_HOST=$null diff --git a/ci/test.sh b/ci/test.sh index 136ff2581..3bd5dedaa 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -79,8 +79,9 @@ fi if [ -z "$SKIP_PROXY_TESTS" ]; then echo "Starting HTTP proxy..." - curl -L https://github.com/ethomson/poxyproxy/releases/download/v0.4.0/poxyproxy-0.4.0.jar >poxyproxy.jar - java -jar poxyproxy.jar -d --address 127.0.0.1 --port 8080 --credentials foo:bar --quiet & + curl -L https://github.com/ethomson/poxyproxy/releases/download/v0.5.0/poxyproxy-0.5.0.jar >poxyproxy.jar + java -jar poxyproxy.jar --address 127.0.0.1 --port 8080 --credentials basic_foo:basic_bar --auth-type basic --quiet & + java -jar poxyproxy.jar --address 127.0.0.1 --port 8090 --credentials ntlm_foo:ntlm_bar --auth-type ntlm --quiet & fi if [ -z "$SKIP_SSH_TESTS" ]; then @@ -174,14 +175,26 @@ if [ -z "$SKIP_GITDAEMON_TESTS" ]; then fi if [ -z "$SKIP_PROXY_TESTS" ]; then + # Run against the Basic authenticating proxy echo "" - echo "Running proxy tests" + echo "Running proxy tests (Basic authentication)" echo "" export GITTEST_REMOTE_PROXY_HOST="localhost:8080" - export GITTEST_REMOTE_PROXY_USER="foo" - export GITTEST_REMOTE_PROXY_PASS="bar" + export GITTEST_REMOTE_PROXY_USER="basic_foo" + export GITTEST_REMOTE_PROXY_PASS="basic_bar" run_test proxy + + # Run against the NTLM authenticating proxy + echo "" + echo "Running proxy tests (NTLM authentication)" + echo "" + + export GITTEST_REMOTE_PROXY_HOST="localhost:8090" + export GITTEST_REMOTE_PROXY_USER="ntlm_foo" + export GITTEST_REMOTE_PROXY_PASS="ntlm_bar" + run_test proxy + unset GITTEST_REMOTE_PROXY_HOST unset GITTEST_REMOTE_PROXY_USER unset GITTEST_REMOTE_PROXY_PASS |