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