summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2018-12-04 20:14:45 +0000
committerJulian Andres Klode <jak@debian.org>2018-12-04 20:14:45 +0000
commit294b5e77a25d2600e7f3ce12a996d1694b5be817 (patch)
tree4282524f2298dfd2b9af869ae70e48b940c6d9d7 /test/integration
parent37bdbe03d44975951d2518bb9b3d3636081dca6a (diff)
parentbbfcc05c1978decd28df9681fd73e2a7d9a8c2a5 (diff)
Merge branch 'pu/netrcparts' into 'master'
Add support for /etc/apt/auth.conf.d/*.conf (netrcparts) See merge request apt-team/apt!37
Diffstat (limited to 'test/integration')
-rwxr-xr-xtest/integration/test-authentication-basic13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/integration/test-authentication-basic b/test/integration/test-authentication-basic
index 011f205af..211c73e35 100755
--- a/test/integration/test-authentication-basic
+++ b/test/integration/test-authentication-basic
@@ -53,7 +53,8 @@ Conf foo (1 unstable [all])' aptget install foo -s
}
authfile() {
- local AUTHCONF='rootdir/etc/apt/auth.conf'
+ local AUTHCONF="${2:-rootdir/etc/apt/auth.conf}"
+ mkdir -p "$(dirname "$AUTHCONF")"
rm -f "$AUTHCONF"
printf '%s' "$1" > "$AUTHCONF"
chmod 600 "$AUTHCONF"
@@ -85,6 +86,16 @@ machine localhost
login star@irc
password hunter2'
testauthsuccess "$1"
+
+ # delete file, make sure it fails; add auth.conf.d snippet, works again.
+ rm rootdir/etc/apt/auth.conf
+ testauthfailure "$1"
+
+ authfile 'machine localhost
+login star@irc
+password hunter2' rootdir/etc/apt/auth.conf.d/myauth.conf
+ testauthsuccess "$1"
+ rm rootdir/etc/apt/auth.conf.d/myauth.conf
}
msgmsg 'server basic auth'