]> git.saurik.com Git - apt.git/blame - test/integration/test-bug-602412-dequote-redirect
use the same code to detect quiet setting in all tools
[apt.git] / test / integration / test-bug-602412-dequote-redirect
CommitLineData
7ea27d2a
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
f9b4f12d
DK
18testrun() {
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
24Hit $1 unstable/main Sources
25Hit $1 unstable/main amd64 Packages
26Hit $1 unstable/main Translation-en
4bcb5f4b 27Reading package lists..." aptget update
f9b4f12d
DK
28
29 msgtest 'Test redirection works in' 'package download'
30 testsuccess --nomsg aptget install unrelated --download-only -y
31}
32
33testrun 'http://localhost:8080'
34
35rm -rf rootdir/var/lib/apt/lists rootdir/var/cache/apt/archives
36changetohttpswebserver
37
38testrun 'https://localhost:4433'