]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-authentication-basic
report warnings&errors consistently in edit-sources
[apt.git] / test / integration / test-authentication-basic
index e6dfc0272ecb4f01db3352e732561f3430ec8307..9a15c760429bf1f98ef2e0c44f0f7689677954c8 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/sh
 set -e
 
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
 
 setupenvironment
 configarchitecture 'i386'
@@ -10,7 +10,7 @@ configarchitecture 'i386'
 insertpackage 'unstable' 'foo' 'all' '1'
 setupaptarchive --no-update
 
-changetohttpswebserver --authorization="$(printf '%s' 'star:hunter2' | base64 )"
+changetohttpswebserver --authorization="$(printf '%s' 'star@irc:hunter2' | base64 )"
 
 echo 'See, when YOU type hunter2, it shows to us as *******' > aptarchive/bash
 
@@ -61,7 +61,7 @@ runtest() {
 
        # good auth
        authfile 'machine localhost
-login star
+login star@irc
 password hunter2'
        testauthsuccess "$1"
 
@@ -77,7 +77,7 @@ login debian
 password jessie
 
 machine localhost
-login star
+login star@irc
 password hunter2'
        testauthsuccess "$1"
 }
@@ -85,6 +85,9 @@ password hunter2'
 msgmsg 'server basic auth'
 rewritesourceslist "http://localhost:${APTHTTPPORT}"
 runtest "http://localhost:${APTHTTPPORT}"
+rewritesourceslist "http://star%40irc:hunter2@localhost:${APTHTTPPORT}"
+authfile ''
+testauthsuccess "http://star%40irc:hunter2@localhost:${APTHTTPPORT}"
 rewritesourceslist "https://localhost:${APTHTTPSPORT}"
 runtest "https://localhost:${APTHTTPSPORT}"
 rewritesourceslist "http://localhost:${APTHTTPPORT}"