]> git.saurik.com Git - apt.git/blame - test/integration/test-bug-602412-dequote-redirect
fix test-bug-602412-dequote-redirect by removing the aptget update size information
[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
77364252
MV
23 local LOG='update.log'
24 # strip away the [ 304 B ] info
25 aptget update 2>&1 | sed -e 's/\ \[.*//' > $LOG
f9b4f12d
DK
26 testequal "Hit $1 unstable InRelease
27Hit $1 unstable/main Sources
28Hit $1 unstable/main amd64 Packages
29Hit $1 unstable/main Translation-en
77364252 30Reading package lists..." cat $LOG
f9b4f12d
DK
31
32 msgtest 'Test redirection works in' 'package download'
33 testsuccess --nomsg aptget install unrelated --download-only -y
34}
35
36testrun 'http://localhost:8080'
37
38rm -rf rootdir/var/lib/apt/lists rootdir/var/cache/apt/archives
39changetohttpswebserver
40
41testrun 'https://localhost:4433'