summaryrefslogtreecommitdiff
path: root/test/integration/test-acquire-same-file-multiple-times
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-09-15 00:33:12 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-09-15 10:16:09 +0200
commit6c0765c096ffb4df14169236c865bbb2b10974ae (patch)
treed4b37ceb25dec384ba08007a8b83d0ab4a6b7f92 /test/integration/test-acquire-same-file-multiple-times
parentaf81ab9030229b4ce6cbe28f0f0831d4896fda01 (diff)
tests: don't use hardcoded port for http and https
This allows running tests in parallel. Git-Dch: Ignore
Diffstat (limited to 'test/integration/test-acquire-same-file-multiple-times')
-rwxr-xr-xtest/integration/test-acquire-same-file-multiple-times12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/integration/test-acquire-same-file-multiple-times b/test/integration/test-acquire-same-file-multiple-times
index 255a71a33..354c683f2 100755
--- a/test/integration/test-acquire-same-file-multiple-times
+++ b/test/integration/test-acquire-same-file-multiple-times
@@ -12,7 +12,8 @@ APTARCHIVE="$(readlink -f ./aptarchive)"
filedown() {
msgtest 'Downloading the same URI twice over file' "$1"
- testsuccess --nomsg apthelper download-file "file:///$APTARCHIVE/foo" ./downloaded/foo1 '' "file:///$APTARCHIVE/foo" ./downloaded/foo2 '' -o Debug::pkgAcquire::Worker=1
+ testsuccess --nomsg apthelper download-file "file:///$APTARCHIVE/foo" './downloaded/foo1' '' \
+ "file:///$APTARCHIVE/foo" './downloaded/foo2' '' -o Debug::pkgAcquire::Worker=1
cp rootdir/tmp/testsuccess.output download.log
testsuccess cmp "$TESTFILE" ./downloaded/foo1
testsuccess cmp ./downloaded/foo1 ./downloaded/foo2
@@ -44,7 +45,8 @@ changetowebserver -o aptwebserver::redirect::replace::/foo2=/foo
httpdown() {
msgtest 'Downloading the same URI to different files' 'twice over http'
- testsuccess --nomsg apthelper download-file http://localhost:8080/foo ./downloaded/foo1 '' http://localhost:8080/foo ./downloaded/foo2 '' -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::http=1
+ testsuccess --nomsg apthelper download-file "http://localhost:${APTHTTPPORT}/foo" "./downloaded/foo1" '' \
+ "http://localhost:${APTHTTPPORT}/foo" './downloaded/foo2' '' -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::http=1
cp rootdir/tmp/testsuccess.output download.log
testsuccess cmp "$TESTDIR/framework" ./downloaded/foo1
testsuccess cmp ./downloaded/foo1 ./downloaded/foo2
@@ -56,7 +58,8 @@ testrun 'httpdown'
httpredirectdown() {
msgtest 'Redirect leads' 'first URI to the second URI'
- testsuccess --nomsg apthelper download-file http://localhost:8080/foo2 ./downloaded/foo1 '' http://localhost:8080/foo ./downloaded/foo2 '' -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::http=1
+ testsuccess --nomsg apthelper download-file "http://localhost:${APTHTTPPORT}/foo2" "./downloaded/foo1" '' \
+ "http://localhost:${APTHTTPPORT}/foo" './downloaded/foo2' '' -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::http=1
cp rootdir/tmp/testsuccess.output download.log
testsuccess cmp "$TESTDIR/framework" ./downloaded/foo1
testsuccess cmp ./downloaded/foo1 ./downloaded/foo2
@@ -69,7 +72,8 @@ testrun 'httpredirectdown'
httpsamedown() {
msgtest 'Downloading two files via the same URI to' 'the same file'
- testsuccess --nomsg apthelper download-file http://localhost:8080/foo ./downloaded/foo1 '' http://localhost:8080/foo ./downloaded/foo1 '' -o Debug::pkgAcquire::Worker=1
+ testsuccess --nomsg apthelper download-file "http://localhost:${APTHTTPPORT}/foo" "./downloaded/foo1" '' \
+ "http://localhost:${APTHTTPPORT}/foo" './downloaded/foo1' '' -o Debug::pkgAcquire::Worker=1
cp rootdir/tmp/testsuccess.output download.log
testsuccess cmp "$TESTDIR/framework" ./downloaded/foo1
testequal '1' grep -c '200%20URI%20Start' ./download.log