]> git.saurik.com Git - apt.git/blob - test/integration/test-bug-602412-dequote-redirect
do not load filesize in pkgAcqIndexTrans explicitly
[apt.git] / test / integration / test-bug-602412-dequote-redirect
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
11 setupaptarchive
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
18 testrun() {
19 msgtest 'Test redirection works in' 'apt-get update'
20 testsuccess --nomsg aptget update
21
22 # check that I-M-S header is kept in redirections
23 testequal "Hit $1 unstable InRelease
24 Hit $1 unstable/main Sources
25 Hit $1 unstable/main amd64 Packages
26 Hit $1 unstable/main Translation-en
27 Reading package lists..." aptget update
28
29 msgtest 'Test redirection works in' 'package download'
30 testsuccess --nomsg aptget install unrelated --download-only -y
31 }
32
33 testrun 'http://localhost:8080'
34
35 rm -rf rootdir/var/lib/apt/lists rootdir/var/cache/apt/archives
36 changetohttpswebserver
37
38 testrun 'https://localhost:4433'