4 TESTDIR
=$(readlink -f $(dirname $0))
8 configarchitecture
'amd64' 'i386'
10 insertpackage
'unstable' 'apt' 'all' '1.0'
12 setupaptarchive
--no-update
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
21 # hit again with a good cache
22 testsuccessequal
"Hit $1 unstable InRelease
23 Reading package lists..." aptget update
24 testfileequal
'listsdir.lst' "$(listcurrentlistsdirectory)"
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
30 Reading package lists..." aptget update
31 testfileequal
'listsdir-without-amd64.lst' "$(listcurrentlistsdirectory)"
33 # readd arch so its downloaded again
34 configarchitecture
'amd64' 'i386'
35 testsuccessequal
"Hit $1 unstable InRelease
36 Get:1 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-amd64/Packages.gz') B]
37 Reading package lists..." aptget update
38 testfileequal
'listsdir.lst' "$(listcurrentlistsdirectory)"
42 methodtest
'http://localhost:8080'
44 changetohttpswebserver
45 methodtest
'https://localhost:4433'