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