]> git.saurik.com Git - apt.git/blame - test/integration/test-bug-602412-dequote-redirect
add simple url rewriting to the webserver
[apt.git] / test / integration / test-bug-602412-dequote-redirect
CommitLineData
d37911ac
DK
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6setupenvironment
7configarchitecture 'amd64'
8
9buildsimplenativepackage 'unrelated' 'all' '0.5~squeeze1' 'unstable'
10
11setupaptarchive
12changetowebserver -o aptwebserver::redirect::replace::/pool/=/newpool/ \
13 -o aptwebserver::redirect::replace::/dists/=/newdists/
14
15mv aptarchive/pool aptarchive/newpool
16mv aptarchive/dists aptarchive/newdists
17
18msgtest 'Test redirection works in' 'apt-get update'
19aptget update -qq && msgpass || msgfail
20
21# check that I-M-S header is kept in redirections
22testequal 'Hit http://localhost unstable InRelease
23Hit http://localhost unstable/main Sources
24Hit http://localhost unstable/main amd64 Packages
25Hit http://localhost unstable/main Translation-en
26Reading package lists...' aptget update
27
28msgtest 'Test redirection works in' 'package download'
29aptget install unrelated --download-only -qq && msgpass || msgfail