]>
Commit | Line | Data |
---|---|---|
7ea27d2a DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | setupenvironment | |
7 | configarchitecture 'amd64' | |
8 | ||
9 | buildsimplenativepackage 'unrelated' 'all' '0.5~squeeze1' 'unstable' | |
10 | ||
27925d82 | 11 | setupaptarchive --no-update |
7ea27d2a DK |
12 | changetowebserver -o aptwebserver::redirect::replace::/pool/=/newpool/ \ |
13 | -o aptwebserver::redirect::replace::/dists/=/newdists/ | |
14 | ||
15 | mv aptarchive/pool aptarchive/newpool | |
16 | mv aptarchive/dists aptarchive/newdists | |
17 | ||
f9b4f12d | 18 | testrun() { |
27925d82 | 19 | msgmsg 'Test redirection works in method boundaries' "$1" |
f9b4f12d DK |
20 | msgtest 'Test redirection works in' 'apt-get update' |
21 | testsuccess --nomsg aptget update | |
22 | ||
23 | # check that I-M-S header is kept in redirections | |
1eb1836f | 24 | testsuccessequal "Hit:1 $1 unstable InRelease |
4bcb5f4b | 25 | Reading package lists..." aptget update |
f9b4f12d DK |
26 | |
27 | msgtest 'Test redirection works in' 'package download' | |
28 | testsuccess --nomsg aptget install unrelated --download-only -y | |
29 | } | |
30 | ||
31 | testrun 'http://localhost:8080' | |
32 | ||
33 | rm -rf rootdir/var/lib/apt/lists rootdir/var/cache/apt/archives | |
34 | changetohttpswebserver | |
35 | ||
36 | testrun 'https://localhost:4433' |