]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-redirect-loop
reset HOME, USER(NAME), TMPDIR & SHELL in DropPrivileges
[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
57401c48
DK
10echo 'alright' > aptarchive/working
11changetohttpswebserver
12webserverconfig 'aptwebserver::redirect::replace::/redirectme3/' '/redirectme/'
13webserverconfig 'aptwebserver::redirect::replace::/redirectme2/' '/redirectme3/'
14webserverconfig 'aptwebserver::redirect::replace::/redirectme/' '/redirectme2/'
15
16testfailure apthelper download-file "http://localhost:${APTHTTPPORT}/redirectme/working" httpfile
17testsuccess grep 'Redirection loop encountered' rootdir/tmp/testfailure.output
18
19testfailure apthelper download-file "https://localhost:${APTHTTPSPORT}/redirectme/working" httpsfile
20testsuccess grep 'Redirection loop encountered' rootdir/tmp/testfailure.output