]>
git.saurik.com Git - apt.git/blob - test/integration/test-bug-602412-dequote-redirect
4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
7 configarchitecture 'amd64'
9 buildsimplenativepackage 'unrelated' 'all' '0.5~squeeze1' 'unstable'
11 setupaptarchive --no-update
12 changetowebserver -o aptwebserver::redirect::replace::/pool/=/newpool/ \
13 -o aptwebserver::redirect::replace::/dists/=/newdists/
15 mv aptarchive/pool aptarchive/newpool
16 mv aptarchive/dists aptarchive/newdists
19 msgmsg "Test
$1 redirection works
in method boundaries
" "$2"
20 msgtest 'Test redirection works in' 'apt-get update'
21 testsuccess --nomsg aptget update
23 # check that I-M-S header is kept in redirections
24 testsuccessequal "Hit
:1 $2 unstable InRelease
25 Reading package lists...
" aptget update
27 msgtest 'Test redirection works in' 'package download'
28 testsuccess --nomsg aptget install unrelated --download-only -y
31 for CODE in 301 302 307; do
32 webserverconfig 'aptwebserver::redirect::httpcode' "$CODE"
33 testrun "$CODE" "http
://localhost
:${APTHTTPPORT}"
34 testsuccess grep "^HTTP
/1.1 $CODE " aptarchive/webserver.log
35 rm -rf rootdir/var/lib/apt/lists rootdir/var/cache/apt/archives
38 changetohttpswebserver
40 for CODE in 301 302 307; do
41 webserverconfig 'aptwebserver::redirect::httpcode' "$CODE"
42 testrun "$CODE" "https
://localhost
:${APTHTTPSPORT}"
43 rm -rf rootdir/var/lib/apt/lists rootdir/var/cache/apt/archives