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