]>
Commit | Line | Data |
---|---|---|
dc95fee1 MV |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | ||
7 | setupenvironment | |
8 | configarchitecture "i386" | |
9 | ||
0d58c26a | 10 | insertpackage 'stable' 'apt' 'all' '1' |
dc95fee1 MV |
11 | setupaptarchive --no-update |
12 | ||
0d58c26a | 13 | echo 'alright' > aptarchive/working |
dc95fee1 MV |
14 | changetohttpswebserver -o 'aptwebserver::redirect::replace::/redirectme/=http://localhost:8080/' |
15 | ||
0d58c26a | 16 | msgtest 'download of a file works via' 'http' |
27925d82 | 17 | testsuccess --nomsg downloadfile 'http://localhost:8080/working' httpfile |
0d58c26a | 18 | testfileequal httpfile 'alright' |
dc95fee1 | 19 | |
0d58c26a | 20 | msgtest 'download of a file works via' 'https' |
27925d82 | 21 | testsuccess --nomsg downloadfile 'https://localhost:4433/working' httpsfile |
0d58c26a | 22 | testfileequal httpsfile 'alright' |
dc95fee1 | 23 | |
0d58c26a | 24 | msgtest 'download of a file does not work if' 'https redirected to http' |
27925d82 | 25 | testfailure --nomsg downloadfile 'https://localhost:4433/redirectme/working' redirectfile |
0d58c26a DK |
26 | |
27 | msgtest 'libcurl has forbidden access in last request to' 'http resource' | |
27925d82 | 28 | testsuccess --nomsg grep -q -E -- 'Protocol "?http"? not supported or disabled in libcurl' rootdir/tmp/testfailure.output |