diff options
author | David Kalnischkies <david@kalnischkies.de> | 2014-10-15 03:47:50 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2014-10-15 03:47:50 +0200 |
commit | 68ba0b7f4e1c03edfb6f621e7e7314ea610af96b (patch) | |
tree | de275968bbc64bbf58bd365477821d825b995968 /test/integration/test-bug-738785-switch-protocol | |
parent | 460601d53039b1d1b5688a8cd58bae10fb746f57 (diff) |
testcases runable as root
Running the testcases is usually not a good idea, but it can be handy to
check if the privilege dropping works.
Git-Dch: Ignore
Diffstat (limited to 'test/integration/test-bug-738785-switch-protocol')
-rwxr-xr-x | test/integration/test-bug-738785-switch-protocol | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/integration/test-bug-738785-switch-protocol b/test/integration/test-bug-738785-switch-protocol index f81bba4b9..f450e5e5a 100755 --- a/test/integration/test-bug-738785-switch-protocol +++ b/test/integration/test-bug-738785-switch-protocol @@ -49,8 +49,14 @@ rm https cd - >/dev/null echo "Dir::Bin::Methods \"${COPYMETHODS}\";" >> aptconfig.conf -testequal "E: The method driver $(pwd)/rootdir/usr/lib/apt/methods/https could not be found. +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. +N: Is the package apt-transport-https installed?" aptget download apt -q=0 +fi testsuccess test ! -e apt_1.0_all.deb # revert to all methods |