]> git.saurik.com Git - apt.git/blob - test/integration/test-different-methods-for-same-source
correct cross & disappear progress detection
[apt.git] / test / integration / test-different-methods-for-same-source
1 #!/bin/sh
2 set -e
3
4 TESTDIR="$(readlink -f "$(dirname "$0")")"
5 . "$TESTDIR/framework"
6 setupenvironment
7 configarchitecture 'amd64'
8
9 insertpackage 'stable' 'foo' 'all' '1'
10 insertsource 'stable' 'foo' 'all' '1'
11 setupaptarchive --no-update
12
13 changetowebserver
14 webserverconfig 'aptwebserver::redirect::replace::/redirectme/' "http://localhost:${APTHTTPPORT}/"
15
16 echo 'Dir::Bin::Methods::http-ng "http";' > rootdir/etc/apt/apt.conf.d/99add-http-ng-method
17 sed -i -e 's# http:# http-ng:#' $(find rootdir/etc/apt/sources.list.d -name '*-deb-src.list')
18
19 testsuccess apt update -o Debug::Acquire::http-ng=1
20 cp rootdir/tmp/testsuccess.output update.log
21 # all requests are folded into the first Release file
22 testsuccess grep ' http-ng://' update.log
23 testfailure grep ' http://' update.log
24 # see if method-specific debug was enabled
25 testsuccess grep '^Answer for: http-ng:' update.log
26
27 rm -rf rootdir/var/lib/apt/lists
28 sed -i -e "s#:${APTHTTPPORT}/#:${APTHTTPPORT}/redirectme#" rootdir/etc/apt/sources.list.d/*
29 testsuccess apt update -o Debug::Acquire::http-ng=1
30 cp rootdir/tmp/testsuccess.output update.log
31 # all requests are folded into the first Release file
32 testsuccess grep ' http-ng://' update.log
33 testfailure grep '^[^L].* http://' update.log
34 # see if method-specific debug was enabled
35 testsuccess grep '^Answer for: http-ng:' update.log