]> git.saurik.com Git - apt.git/blob - test/integration/test-bug-829651
test: Use a file to determine TEST_DEFAULT_GROUP
[apt.git] / test / integration / test-bug-829651
1 #!/bin/sh
2 set -e
3
4 TESTDIR="$(readlink -f "$(dirname "$0")")"
5 . "$TESTDIR/framework"
6 setupenvironment
7 configarchitecture 'amd64'
8
9 if [ "$(id -u)" = '0' ]; then
10 msgskip 'Tests for unreadable files do not work as root'
11 exit 0
12 fi
13
14 insertinstalledpackage 'foo' 'amd64' '1'
15 insertpackage 'unstable' 'foo' 'amd64' '2'
16
17 setupaptarchive
18
19
20 testsuccess aptget indextargets
21
22 aptget clean
23 chmod -r rootdir/var/lib/dpkg/status
24
25 testfailureequal "E: Could not open file ${TMPWORKINGDIRECTORY}/rootdir/var/lib/dpkg/status - open (13: Permission denied)
26 E: Problem opening ${TMPWORKINGDIRECTORY}/rootdir/var/lib/dpkg/status
27 E: The package lists or status file could not be parsed or opened." aptget indextargets