]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-update-expected-size
fix test-cve-2013-1051-InRelease-parsing (fails now in the method)
[apt.git] / test / integration / test-apt-update-expected-size
CommitLineData
a2d40703
MV
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6
7setupenvironment
8configarchitecture "i386"
9
10insertpackage 'unstable' 'apt' 'all' '1.0'
11
12setupaptarchive --no-update
13changetowebserver
14
15# normal update works fine
16testsuccess aptget update
17
18# append junk at the end of the Packages.gz/Packages
19SIZE="$(stat --printf=%s aptarchive/dists/unstable/main/binary-i386/Packages)"
20echo "1234567890" >> aptarchive/dists/unstable/main/binary-i386/Packages.gz
21echo "1234567890" >> aptarchive/dists/unstable/main/binary-i386/Packages
22NEW_SIZE="$(stat --printf=%s aptarchive/dists/unstable/main/binary-i386/Packages)"
23rm -f rootdir/var/lib/apt/lists/localhost*
24testequal "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
26E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
27