]> git.saurik.com Git - apt.git/blame - test/integration/test-different-methods-for-same-source
test: Get rid of debhelper rules.tiny example dep
[apt.git] / test / integration / test-different-methods-for-same-source
CommitLineData
b90faf24
DK
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
b90faf24 13changetowebserver
30060442 14webserverconfig 'aptwebserver::redirect::replace::/redirectme/' "http://localhost:${APTHTTPPORT}/"
c9c91069
DK
15
16echo 'Dir::Bin::Methods::http-ng "http";' > rootdir/etc/apt/apt.conf.d/99add-http-ng-method
b90faf24
DK
17sed -i -e 's# http:# http-ng:#' $(find rootdir/etc/apt/sources.list.d -name '*-deb-src.list')
18
30060442 19testsuccess apt update -o Debug::Acquire::http-ng=1
b90faf24
DK
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
30060442
DK
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