4 TESTDIR
=$(readlink -f $(dirname $0))
8 configarchitecture
'native'
10 echo 'found' > aptarchive
/working
11 changetohttpswebserver
-o 'aptwebserver::redirect::replace::/redirectme/=/' \
12 -o 'aptwebserver::httpcode::200=200' -o 'aptwebserver::httpcode::404=404' \
13 -o 'aptwebserver::httpcode::301=301'
17 msgtest
"download of a $1 via" "${3%%:*}"
18 $2 --nomsg downloadfile
"$3" downfile
20 cp rootdir
/tmp
/testsuccess.output download.log
21 #looking for "HTTP server doesn't give Reason-Phrase for 200"
22 testsuccess
grep 'give Reason-Phrase for' download.log
24 if [ "$2" = 'testsuccess' ]; then
25 testfileequal downfile
'found'
27 testfailure
test -e downfile
32 testdownload
'file works' 'testsuccess' "$1/working"
33 testdownload
'file via redirect works' 'testsuccess' "$1/redirectme/working"
35 testdownload
'non-existent file fails' 'testfailure' "$1/failing"
36 testdownload
'non-existent file via redirect fails' 'testfailure' "$1/redirectme/failing"
39 runtest
'http://localhost:8080'
40 runtest
'https://localhost:4433'