4 # ensure that an update will only succeed entirely or not at all
6 TESTDIR
=$(readlink -f $(dirname $0))
10 configarchitecture
'i386'
11 configcompression
'.' 'gz'
13 insertpackage
'unstable' 'foo' 'all' '1.0'
14 insertsource
'unstable' 'foo' 'all' '1.0'
16 setupaptarchive
--no-update
20 mv "${1}.gz" "${1}.gz.bak"
28 mv "${1}.gz.bak" "${1}.gz"
32 # produce an unsigned repository
33 find aptarchive \
( -name 'Release.gpg' -o -name 'InRelease' \
) -delete
34 testfailure aptget update
--no-allow-insecure-repositories
35 testfileequal
"$1" "$(listcurrentlistsdirectory)"
40 breakfile aptarchive
/dists
/unstable
/main
/binary
-i386/Packages
41 testfailure aptget update
42 testfileequal
"$1" "$(listcurrentlistsdirectory)"
43 restorefile aptarchive
/dists
/unstable
/main
/binary
-i386/Packages
45 breakfile aptarchive
/dists
/unstable
/main
/source
/Sources
46 testfailure aptget update
47 testfileequal
"$1" "$(listcurrentlistsdirectory)"
48 restorefile aptarchive
/dists
/unstable
/main
/source
/Sources
52 msgmsg
'Test with no initial data over' "$1"
53 redatereleasefiles
'now'
54 rm -rf rootdir
/var
/lib
/apt
/lists
55 mkdir -p rootdir
/var
/lib
/apt
/lists
/partial
56 listcurrentlistsdirectory
> listsdir.lst
57 testrun
'listsdir.lst'
59 msgmsg
'Test with initial data over' "$1"
60 rm -rf rootdir
/var
/lib
/apt
/lists
61 testsuccess aptget update
-o Debug
::pkgAcquire
::Worker
=1
62 listcurrentlistsdirectory
> listsdir.lst
63 redatereleasefiles
'+1hour'
64 testrun
'listsdir.lst'
70 webserverconfig
'aptwebserver::support::modified-since' 'false' "$1"
71 webserverconfig
'aptwebserver::support::last-modified' 'false' "$1" # curl is clever and sees hits here also
72 webserverconfig
'aptwebserver::support::range' 'false' "$1"
76 changetohttpswebserver