Commit 1ef77e37 by Edward Thomson

ci: test NTLM proxy authentication on Windows

Update our CI tests to start a proxy that requires NTLM authentication;
ensure that our WIndows HTTP client can speak NTLM.
parent ee3d35cf
...@@ -38,10 +38,15 @@ Write-Host "## Configuring test environment" ...@@ -38,10 +38,15 @@ Write-Host "## Configuring test environment"
Write-Host "##############################################################################" Write-Host "##############################################################################"
if (-not $Env:SKIP_PROXY_TESTS) { if (-not $Env:SKIP_PROXY_TESTS) {
Invoke-WebRequest -Method GET -Uri https://github.com/ethomson/poxyproxy/releases/download/v0.7.0/poxyproxy-0.7.0.jar -OutFile poxyproxy.jar
Write-Host ""
Write-Host "Starting HTTP proxy (Basic)..."
javaw -jar poxyproxy.jar --port 8080 --credentials foo:bar --auth-type basic --quiet
Write-Host "" Write-Host ""
Write-Host "Starting HTTP proxy..." Write-Host "Starting HTTP proxy (NTLM)..."
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 --port 8090 --credentials foo:bar --auth-type ntlm --quiet
javaw -jar poxyproxy.jar -d --port 8080 --credentials foo:bar --quiet
} }
Write-Host "" Write-Host ""
...@@ -76,14 +81,24 @@ if (-not $Env:SKIP_ONLINE_TESTS) { ...@@ -76,14 +81,24 @@ if (-not $Env:SKIP_ONLINE_TESTS) {
} }
if (-not $Env:SKIP_PROXY_TESTS) { if (-not $Env:SKIP_PROXY_TESTS) {
# Test HTTP Basic authentication
Write-Host "" Write-Host ""
Write-Host "Running proxy tests" Write-Host "Running proxy tests (Basic authentication)"
Write-Host "" Write-Host ""
$Env:GITTEST_REMOTE_PROXY_HOST="localhost:8080" $Env:GITTEST_REMOTE_PROXY_HOST="localhost:8080"
$Env:GITTEST_REMOTE_PROXY_USER="foo" $Env:GITTEST_REMOTE_PROXY_USER="foo"
$Env:GITTEST_REMOTE_PROXY_PASS="bar" $Env:GITTEST_REMOTE_PROXY_PASS="bar"
run_test proxy
# Test NTLM authentication
Write-Host ""
Write-Host "Running proxy tests (NTLM authentication)"
Write-Host ""
$Env:GITTEST_REMOTE_PROXY_HOST="localhost:8090"
$Env:GITTEST_REMOTE_PROXY_USER="foo"
$Env:GITTEST_REMOTE_PROXY_PASS="bar"
run_test proxy run_test proxy
$Env:GITTEST_REMOTE_PROXY_HOST=$null $Env:GITTEST_REMOTE_PROXY_HOST=$null
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment