]>
Commit | Line | Data |
---|---|---|
a2d40703 MV |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | ||
7 | setupenvironment | |
8 | configarchitecture "i386" | |
9 | ||
10 | insertpackage 'unstable' 'apt' 'all' '1.0' | |
11 | ||
12 | setupaptarchive --no-update | |
13 | changetowebserver | |
14 | ||
15 | # normal update works fine | |
16 | testsuccess aptget update | |
17 | ||
18 | # append junk at the end of the Packages.gz/Packages | |
19 | SIZE="$(stat --printf=%s aptarchive/dists/unstable/main/binary-i386/Packages)" | |
20 | echo "1234567890" >> aptarchive/dists/unstable/main/binary-i386/Packages.gz | |
21 | echo "1234567890" >> aptarchive/dists/unstable/main/binary-i386/Packages | |
22 | NEW_SIZE="$(stat --printf=%s aptarchive/dists/unstable/main/binary-i386/Packages)" | |
23 | rm -f rootdir/var/lib/apt/lists/localhost* | |
24 | testequal "W: Failed to fetch http://localhost:8080/dists/unstable/main/binary-i386/Packages Writing more data than expected ($NEW_SIZE > $SIZE) [IP: ::1 8080] | |
25 | ||
26 | E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq | |
27 |