]> git.saurik.com Git - apt.git/blame_incremental - test/integration/test-bug-602412-dequote-redirect
improve https method queue progress reporting
[apt.git] / test / integration / test-bug-602412-dequote-redirect
... / ...
CommitLineData
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 --no-update
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
18testrun() {
19 msgmsg 'Test redirection works in method boundaries' "$1"
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
24 testsuccessequal "Hit $1 unstable InRelease
25Hit $1 unstable/main Sources
26Hit $1 unstable/main amd64 Packages
27Hit $1 unstable/main Translation-en
28Reading package lists..." aptget update
29
30 msgtest 'Test redirection works in' 'package download'
31 testsuccess --nomsg aptget install unrelated --download-only -y
32}
33
34testrun 'http://localhost:8080'
35
36rm -rf rootdir/var/lib/apt/lists rootdir/var/cache/apt/archives
37changetohttpswebserver
38
39testrun 'https://localhost:4433'