]> git.saurik.com Git - apt.git/blame_incremental - test/integration/test-apt-update-not-modified
a hit on Release files means the indexes will be hits too
[apt.git] / test / integration / test-apt-update-not-modified
... / ...
CommitLineData
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6
7setupenvironment
8configarchitecture 'amd64' 'i386'
9
10insertpackage 'unstable' 'apt' 'all' '1.0'
11
12setupaptarchive --no-update
13
14methodtest() {
15 msgmsg 'Test with' "$1"
16 rm -rf rootdir/var/lib/apt/lists
17 # get our cache populated
18 testsuccess aptget update
19 listcurrentlistsdirectory > listsdir.lst
20
21 # hit again with a good cache
22 testsuccessequal "Hit $1 unstable InRelease
23Reading package lists..." aptget update
24 testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)"
25
26 # drop an architecture, which means the file should be gone now
27 configarchitecture 'i386'
28 sed '/_binary-amd64_Packages/ d' listsdir.lst > listsdir-without-amd64.lst
29 testsuccessequal "Hit $1 unstable InRelease
30Reading package lists..." aptget update
31 testfileequal 'listsdir-without-amd64.lst' "$(listcurrentlistsdirectory)"
32
33 # readd arch so its downloaded again
34 configarchitecture 'amd64' 'i386'
35 testsuccessequal "Hit $1 unstable InRelease
36Get:1 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-amd64/Packages.gz') B]
37Reading package lists..." aptget update
38 testfileequal 'listsdir.lst' "$(listcurrentlistsdirectory)"
39}
40
41changetowebserver
42methodtest 'http://localhost:8080'
43
44changetohttpswebserver
45methodtest 'https://localhost:4433'