]> git.saurik.com Git - apt.git/blob - test/integration/test-bug-623443-fail-on-bad-proxies
Merge commit 'e2073b0276226b625897ef475f225bf8f508719e' as 'triehash'
[apt.git] / test / integration / test-bug-623443-fail-on-bad-proxies
1 #!/bin/sh
2 set -e
3
4 TESTDIR="$(readlink -f "$(dirname "$0")")"
5 . "$TESTDIR/framework"
6 setupenvironment
7 configarchitecture 'amd64'
8
9 buildsimplenativepackage 'unrelated' 'all' '0.5~squeeze1' 'unstable'
10
11 setupaptarchive --no-update
12 changetowebserver
13
14 testsuccess apt update
15 rm -rf rootdir/var/lib/apt/lists
16
17 export http_proxy=enrico:password@proxy-cache.localnet:3128
18 testfailure apt update
19 unset http_proxy
20 testsuccess grep 'Unsupported proxy configured' rootdir/tmp/testfailure.output
21
22 changetohttpswebserver
23
24 testsuccess apt update
25 rm -rf rootdir/var/lib/apt/lists
26
27 export http_proxy=enrico:password@proxy-cache.localnet:3128
28 testfailure apt update
29 unset http_proxy
30 testsuccess grep 'Unsupported proxy configured' rootdir/tmp/testfailure.output
31
32 echo 'Acquire::http::Proxy "foo://example.org";
33 Acquire::https::Proxy "DIRECT";' > rootdir/etc/apt/apt.conf.d/proxy.conf
34 testsuccess apt update