]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-authentication-basic
Do not consider SHA1 usable
[apt.git] / test / integration / test-authentication-basic
index 3a6897b5927b1e63b349176b265d2e19d4615c2f..95211ac0e821e65e0e486bf292cccb86752625a4 100755 (executable)
@@ -1,14 +1,15 @@
 #!/bin/sh
 set -e
 
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
 
 setupenvironment
 configarchitecture 'i386'
 
 insertpackage 'unstable' 'foo' 'all' '1'
 setupaptarchive --no-update
+exit
 
 changetohttpswebserver --authorization="$(printf '%s' 'star:hunter2' | base64 )"
 
@@ -83,24 +84,24 @@ password hunter2'
 }
 
 msgmsg 'server basic auth'
-rewritesourceslist 'http://localhost:8080'
-runtest 'http://localhost:8080'
-rewritesourceslist 'https://localhost:4433'
-runtest 'https://localhost:4433'
-rewritesourceslist 'http://localhost:8080'
+rewritesourceslist "http://localhost:${APTHTTPPORT}"
+runtest "http://localhost:${APTHTTPPORT}"
+rewritesourceslist "https://localhost:${APTHTTPSPORT}"
+runtest "https://localhost:${APTHTTPSPORT}"
+rewritesourceslist "http://localhost:${APTHTTPPORT}"
 
 msgmsg 'proxy to server basic auth'
 webserverconfig 'aptwebserver::request::absolute' 'uri'
-export http_proxy='http://localhost:8080'
-runtest 'http://localhost:8080'
+export http_proxy="http://localhost:${APTHTTPPORT}"
+runtest "http://localhost:${APTHTTPPORT}"
 unset http_proxy
 
 msgmsg 'proxy basic auth to server basic auth'
 webserverconfig 'aptwebserver::proxy-authorization' "$(printf 'moon:deer2' | base64)"
-export http_proxy='http://moon:deer2@localhost:8080'
-runtest 'http://localhost:8080'
+export http_proxy="http://moon:deer2@localhost:${APTHTTPPORT}"
+runtest "http://localhost:${APTHTTPPORT}"
 
 msgmsg 'proxy basic auth to server'
 authfile ''
 webserverconfig 'aptwebserver::authorization' ''
-testauthsuccess 'http://localhost:8080'
+testauthsuccess "http://localhost:${APTHTTPPORT}"