]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-redirect-loop
test: Avoid use of /proc/self/fd
[apt.git] / test / integration / test-apt-redirect-loop
CommitLineData
57401c48
DK
1#!/bin/sh
2set -e
3
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
6
7setupenvironment
8configarchitecture "i386"
9
10insertpackage 'stable' 'apt' 'all' '1'
11setupaptarchive --no-update
12
13echo 'alright' > aptarchive/working
14changetohttpswebserver
15webserverconfig 'aptwebserver::redirect::replace::/redirectme3/' '/redirectme/'
16webserverconfig 'aptwebserver::redirect::replace::/redirectme2/' '/redirectme3/'
17webserverconfig 'aptwebserver::redirect::replace::/redirectme/' '/redirectme2/'
18
19testfailure apthelper download-file "http://localhost:${APTHTTPPORT}/redirectme/working" httpfile
20testsuccess grep 'Redirection loop encountered' rootdir/tmp/testfailure.output
21
22testfailure apthelper download-file "https://localhost:${APTHTTPSPORT}/redirectme/working" httpsfile
23testsuccess grep 'Redirection loop encountered' rootdir/tmp/testfailure.output