4 # ensure that an update will only succeed entirely or not at all
6 TESTDIR
=$(readlink -f $(dirname $0))
10 configarchitecture
'i386'
12 insertpackage
'unstable' 'foo' 'all' '1.0'
13 insertsource
'unstable' 'foo' 'all' '1.0'
15 setupaptarchive
--no-update
29 # produce an unsigned repository
30 find aptarchive \
( -name 'Release.gpg' -o -name 'InRelease' \
) -delete
31 testfailure aptget update
--no-allow-insecure-repositories
32 testfileequal
"$1" "$(listcurrentlistsdirectory)"
37 breakfile aptarchive
/dists
/unstable
/main
/binary
-i386/Packages
38 testfailure aptget update
39 testfileequal
"$1" "$(listcurrentlistsdirectory)"
40 restorefile aptarchive
/dists
/unstable
/main
/binary
-i386/Packages
42 breakfile aptarchive
/dists
/unstable
/main
/source
/Sources
43 testfailure aptget update
44 testfileequal
"$1" "$(listcurrentlistsdirectory)"
45 restorefile aptarchive
/dists
/unstable
/main
/source
/Sources
49 msgmsg
'Test with no initial data over' "$1"
50 rm -rf rootdir
/var
/lib
/apt
/lists
51 mkdir -p rootdir
/var
/lib
/apt
/lists
/partial
52 listcurrentlistsdirectory
> listsdir.lst
53 testrun
'listsdir.lst'
55 msgmsg
'Test with initial data over' "$1"
56 testsuccess aptget update
57 listcurrentlistsdirectory
> listsdir.lst
58 testrun
'listsdir.lst'
64 webserverconfig
'aptwebserver::support::modified-since' 'false' "$1"
65 webserverconfig
'aptwebserver::support::last-modified' 'false' "$1" # curl is clever and sees hits here also
66 webserverconfig
'aptwebserver::support::range' 'false' "$1"
70 changetohttpswebserver