summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-get-download
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-10-15 03:47:50 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2014-10-15 03:47:50 +0200
commit68ba0b7f4e1c03edfb6f621e7e7314ea610af96b (patch)
treede275968bbc64bbf58bd365477821d825b995968 /test/integration/test-apt-get-download
parent460601d53039b1d1b5688a8cd58bae10fb746f57 (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-apt-get-download')
-rwxr-xr-xtest/integration/test-apt-get-download13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/integration/test-apt-get-download b/test/integration/test-apt-get-download
index 0514542b3..9a154e5fb 100755
--- a/test/integration/test-apt-get-download
+++ b/test/integration/test-apt-get-download
@@ -11,18 +11,27 @@ buildsimplenativepackage 'apt' 'all' '1.0' 'stable'
buildsimplenativepackage 'apt' 'all' '2.0' 'unstable'
insertinstalledpackage 'vrms' 'all' '1.0'
+OLD_UMASK="$(umask)"
umask 0027
+setupaptarchive --no-update
+umask "$OLD_UMASK"
-setupaptarchive
-
+# directories should be readable by everyone
+find aptarchive/dists -type d | while read dir; do
+ chmod o+rx "$dir"
+done
# apt-ftparchive knows how to chmod files
find aptarchive/dists -name '*Packages*' -type f | while read file; do
testaccessrights "$file" '644'
+ chmod 640 "$file"
done
# created by the framework without special care
find aptarchive/dists -name '*Release*' -type f | while read file; do
testaccessrights "$file" '640'
done
+
+testsuccess aptget update
+
# all copied files are properly chmodded
find rootdir/var/lib/apt/lists -type f | while read file; do
testaccessrights "$file" '644'