summaryrefslogtreecommitdiff
path: root/test/integration/test-bug-738785-switch-protocol
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-11-06 08:55:06 +0100
committerMichael Vogt <mvo@ubuntu.com>2014-11-06 08:55:06 +0100
commit9397ea947c23c0957a683152360909810340abce (patch)
tree6b29e35b9ef602c15d0aab20eefdec3138eb4692 /test/integration/test-bug-738785-switch-protocol
parent87ecd6a2d719aeaeedd99dd500b467e966376f1c (diff)
parent6e2261d0f250406058d66b360080aa986953ae19 (diff)
Merge remote-tracking branch 'upstream/debian/experimental' into feature/no-more-acquire-guessing
Conflicts: apt-pkg/acquire-item.cc
Diffstat (limited to 'test/integration/test-bug-738785-switch-protocol')
-rwxr-xr-xtest/integration/test-bug-738785-switch-protocol14
1 files changed, 6 insertions, 8 deletions
diff --git a/test/integration/test-bug-738785-switch-protocol b/test/integration/test-bug-738785-switch-protocol
index f450e5e5a..0f458e099 100755
--- a/test/integration/test-bug-738785-switch-protocol
+++ b/test/integration/test-bug-738785-switch-protocol
@@ -25,6 +25,7 @@ downloadfile 'http://localhost:8080/pool/apt_1.0/changelog' changelog >/dev/null
echo 'Apt::Changelogs::Server "http://localhost:8080/redirectme";' > rootdir/etc/apt/apt.conf.d/changelog.conf
testequal "'http://localhost:8080/redirectme/pool/apt_1.0/changelog'" aptget changelog apt --print-uris
+cd downloaded
testsuccess aptget changelog apt -d
testsuccess test -s apt.changelog
rm -f apt.changelog
@@ -32,6 +33,7 @@ rm -f apt.changelog
testsuccess aptget download apt
testsuccess test -s apt_1.0_all.deb
rm apt_1.0_all.deb
+cd - >/dev/null
testsuccess aptget install apt -y
testdpkginstalled 'apt'
@@ -49,15 +51,11 @@ rm https
cd - >/dev/null
echo "Dir::Bin::Methods \"${COPYMETHODS}\";" >> aptconfig.conf
-if [ "$(id -u)" = '0' ]; then
- testequal "Can't drop privileges for downloading as file '$(pwd)/apt_1.0_all.deb' couldn't be accessed by user '_apt'.
-E: The method driver $(pwd)/rootdir/usr/lib/apt/methods/https could not be found.
-N: Is the package apt-transport-https installed?" aptget download apt -q=0
-else
- testequal "E: The method driver $(pwd)/rootdir/usr/lib/apt/methods/https could not be found.
+cd downloaded
+testequal "E: The method driver $(readlink -f './../')/rootdir/usr/lib/apt/methods/https could not be found.
N: Is the package apt-transport-https installed?" aptget download apt -q=0
-fi
-testsuccess test ! -e apt_1.0_all.deb
+testfailure test -e apt_1.0_all.deb
+cd - >/dev/null
# revert to all methods
rm -rf rootdir/$COPYMETHODS