]> git.saurik.com Git - apt.git/blob - test/integration/test-bug-602412-dequote-redirect
merged lp:~mvo/apt/hash-order
[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 msgtest 'Test redirection works in' 'apt-get update'
19 aptget update -qq && msgpass || msgfail
20
21 # check that I-M-S header is kept in redirections
22 testequal 'Hit http://localhost unstable InRelease
23 Hit http://localhost unstable/main Sources
24 Hit http://localhost unstable/main amd64 Packages
25 Hit http://localhost unstable/main Translation-en
26 Reading package lists...' aptget update
27
28 msgtest 'Test redirection works in' 'package download'
29 aptget install unrelated --download-only -qq && msgpass || msgfail