4 TESTDIR
=$(readlink -f $(dirname $0))
8 configarchitecture
'amd64' 'i386'
10 insertpackage
'unstable' 'apt' 'all' '1.0'
12 setupaptarchive
--no-update
15 msgmsg
'Test InRelease 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)"
40 webserverconfig
'aptwebserver::support::modified-since' 'false'
41 webserverconfig
'aptwebserver::support::last-modified' 'false'
42 testsuccessequal
"Get:1 $1 unstable InRelease [$(stat -c '%s' 'aptarchive/dists/unstable/InRelease') B]
43 Reading package lists..." aptget update
44 webserverconfig
'aptwebserver::support::modified-since' 'true'
45 webserverconfig
'aptwebserver::support::last-modified' 'true'
47 msgmsg
'Test Release.gpg with' "$1"
48 rm -rf rootdir
/var
/lib
/apt
/lists
49 cp -a aptarchive
/dists aptarchive
/dists.good
50 find aptarchive
/dists
-name 'InRelease' -delete
51 # get our cache populated
52 testsuccess aptget update
53 listcurrentlistsdirectory
> listsdir.lst
55 # hit again with a good cache
56 testsuccessequal
"Ign $1 unstable InRelease
58 Hit $1 unstable Release
59 Reading package lists..." aptget update
60 testfileequal
'listsdir.lst' "$(listcurrentlistsdirectory)"
62 # drop an architecture, which means the file should be gone now
63 configarchitecture
'i386'
64 sed '/_binary-amd64_Packages/ d' listsdir.lst
> listsdir
-without-amd64.lst
65 testsuccessequal
"Ign $1 unstable InRelease
67 Hit $1 unstable Release
68 Reading package lists..." aptget update
69 testfileequal
'listsdir-without-amd64.lst' "$(listcurrentlistsdirectory)"
71 # readd arch so its downloaded again
72 configarchitecture
'amd64' 'i386'
73 testsuccessequal
"Ign $1 unstable InRelease
75 Hit $1 unstable Release
76 Get:1 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable/main/binary-amd64/Packages.gz') B]
77 Reading package lists..." aptget update
78 testfileequal
'listsdir.lst' "$(listcurrentlistsdirectory)"
80 webserverconfig
'aptwebserver::support::modified-since' 'false'
81 webserverconfig
'aptwebserver::support::last-modified' 'false'
82 testsuccessequal
"Ign $1 unstable InRelease
84 Get:1 $1 unstable Release [$(stat -c '%s' 'aptarchive/dists/unstable/Release') B]
85 Reading package lists..." aptget update
86 webserverconfig
'aptwebserver::support::modified-since' 'true'
87 webserverconfig
'aptwebserver::support::last-modified' 'true'
89 rm -rf aptarchive
/dists
90 cp -a aptarchive
/dists.good aptarchive
/dists
94 methodtest
'http://localhost:8080'
96 changetohttpswebserver
97 methodtest
'https://localhost:4433'