summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-get-changelog
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-08-23 13:46:35 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-08-27 11:27:45 +0200
commitd12561703c7776f665b68c91bddb28dea0728894 (patch)
treea6ce47161e8dfa2670fdbda7551e441203b51040 /test/integration/test-apt-get-changelog
parent3a8776a37af38127fb04565959e8e0e449eb04a4 (diff)
use always priv-dropping for changelog download as root
First of, the temporary directory we download the changelog to needs to be owned by _apt, but that also means that we don't need to check if we could/should drop privs as the download happens to a dedicated tempdir and only after that it is moved to its final location by a privileged user.
Diffstat (limited to 'test/integration/test-apt-get-changelog')
-rwxr-xr-xtest/integration/test-apt-get-changelog9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/integration/test-apt-get-changelog b/test/integration/test-apt-get-changelog
index 5fa8543b9..6ca05d0fa 100755
--- a/test/integration/test-apt-get-changelog
+++ b/test/integration/test-apt-get-changelog
@@ -60,14 +60,15 @@ testsuccessequal "'http://localhost:8080/main/f/foo/foo_1.0/change.txt' foo.chan
echo 'Acquire::Changelogs::URI::Label::Testcases "http://localhost:8080/pool/CHANGEPATH/changelog";' > rootdir/etc/apt/apt.conf.d/changelog.conf
testsuccessequal "'http://localhost:8080/pool/main/f/foo/foo_1.0/changelog' foo.changelog" aptget changelog foo --print-uris
-cd downloaded
testsuccess aptget changelog foo -qq
-testfileequal '../rootdir/tmp/testsuccess.output' "$(cat ../aptarchive/pool/main/f/foo/foo_1.0/changelog)"
+testfileequal 'rootdir/tmp/testsuccess.output' "$(cat aptarchive/pool/main/f/foo/foo_1.0/changelog)"
testsuccess aptget changelog foo libbar -qq
-testfileequal '../rootdir/tmp/testsuccess.output' "$(cat ../aptarchive/pool/main/f/foo/foo_1.0/changelog)
-$(cat ../aptarchive/pool/main/libb/libbar/libbar_1.0/changelog)"
+testfileequal 'rootdir/tmp/testsuccess.output' "$(cat aptarchive/pool/main/f/foo/foo_1.0/changelog)
+$(cat aptarchive/pool/main/libb/libbar/libbar_1.0/changelog)"
+
+cd downloaded
testsuccess aptget changelog foo -d
testfilestats 'foo.changelog' '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:644"