From 6c0765c096ffb4df14169236c865bbb2b10974ae Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 15 Sep 2015 00:33:12 +0200 Subject: tests: don't use hardcoded port for http and https This allows running tests in parallel. Git-Dch: Ignore --- .../test-ubuntu-bug-1098738-apt-get-source-md5sum | 44 +++++++++++----------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum') diff --git a/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum b/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum index f286f5650..f32d74ad7 100755 --- a/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum +++ b/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum @@ -158,8 +158,8 @@ testok() { testsuccessequal "Reading package lists... Building dependency tree... Need to get 6 B of source archives. -Get:1 http://localhost:8080 $1 1.0 (dsc) [3 B] -Get:2 http://localhost:8080 $1 1.0 (tar) [3 B] +Get:1 http://localhost:${APTHTTPPORT} $1 1.0 (dsc) [3 B] +Get:2 http://localhost:${APTHTTPPORT} $1 1.0 (tar) [3 B] Download complete and in download only mode" aptget source -d "$@" msgtest 'Files were successfully downloaded for' "$1" testsuccess --nomsg test -e ${1}_1.0.dsc -a -e ${1}_1.0.tar.gz @@ -198,15 +198,15 @@ testmismatch() { testfailureequal "Reading package lists... Building dependency tree... Need to get 6 B of source archives. -Get:1 http://localhost:8080 $1 1.0 (dsc) [3 B] -Err:1 http://localhost:8080 $1 1.0 (dsc) +Get:1 http://localhost:${APTHTTPPORT} $1 1.0 (dsc) [3 B] +Err:1 http://localhost:${APTHTTPPORT} $1 1.0 (dsc) Hash Sum mismatch -Get:2 http://localhost:8080 $1 1.0 (tar) [3 B] -Err:2 http://localhost:8080 $1 1.0 (tar) +Get:2 http://localhost:${APTHTTPPORT} $1 1.0 (tar) [3 B] +Err:2 http://localhost:${APTHTTPPORT} $1 1.0 (tar) Hash Sum mismatch -E: Failed to fetch http://localhost:8080/${1}_1.0.dsc Hash Sum mismatch +E: Failed to fetch http://localhost:${APTHTTPPORT}/${1}_1.0.dsc Hash Sum mismatch -E: Failed to fetch http://localhost:8080/${1}_1.0.tar.gz Hash Sum mismatch +E: Failed to fetch http://localhost:${APTHTTPPORT}/${1}_1.0.tar.gz Hash Sum mismatch E: Failed to fetch some archives." aptget source -d "$@" msgtest 'Files were not download as they have hashsum mismatches for' "$1" @@ -228,8 +228,8 @@ Download complete and in download only mode" aptget source -d "$@" -o Acquire::F testsuccessequal "Reading package lists... Building dependency tree... Need to get 6 B of source archives. -Get:1 http://localhost:8080 $1 1.0 (dsc) [3 B] -Get:2 http://localhost:8080 $1 1.0 (tar) [3 B] +Get:1 http://localhost:${APTHTTPPORT} $1 1.0 (dsc) [3 B] +Get:2 http://localhost:${APTHTTPPORT} $1 1.0 (tar) [3 B] Download complete and in download only mode" aptget source --allow-unauthenticated -d "$@" -o Acquire::ForceHash=ROT26 msgtest 'Files were downloaded unauthenticated as user allowed it' "$1" testsuccess --nomsg test -e ${1}_1.0.dsc -a -e ${1}_1.0.tar.gz @@ -263,28 +263,28 @@ testfailure --nomsg test -e pkg-no-md5_1.0.dsc -a -e pkg-no-md5_1.0.tar.gz # deal with cases in which we haven't for all files the same checksum type # mostly pathologic as this shouldn't happen, but just to be sure testok pkg-mixed-ok -testfailureequal 'Reading package lists... +testfailureequal "Reading package lists... Building dependency tree... Need to get 6 B of source archives. -Get:1 http://localhost:8080 pkg-mixed-sha1-bad 1.0 (tar) [3 B] -Get:2 http://localhost:8080 pkg-mixed-sha1-bad 1.0 (dsc) [3 B] -Err:2 http://localhost:8080 pkg-mixed-sha1-bad 1.0 (dsc) +Get:1 http://localhost:${APTHTTPPORT} pkg-mixed-sha1-bad 1.0 (tar) [3 B] +Get:2 http://localhost:${APTHTTPPORT} pkg-mixed-sha1-bad 1.0 (dsc) [3 B] +Err:2 http://localhost:${APTHTTPPORT} pkg-mixed-sha1-bad 1.0 (dsc) Hash Sum mismatch -E: Failed to fetch http://localhost:8080/pkg-mixed-sha1-bad_1.0.dsc Hash Sum mismatch +E: Failed to fetch http://localhost:${APTHTTPPORT}/pkg-mixed-sha1-bad_1.0.dsc Hash Sum mismatch -E: Failed to fetch some archives.' aptget source -d pkg-mixed-sha1-bad +E: Failed to fetch some archives." aptget source -d pkg-mixed-sha1-bad msgtest 'Only tar file is downloaded as the dsc has hashsum mismatch' 'pkg-mixed-sha1-bad' testsuccess --nomsg test ! -e pkg-mixed-sha1-bad_1.0.dsc -a -e pkg-mixed-sha1-bad_1.0.tar.gz -testfailureequal 'Reading package lists... +testfailureequal "Reading package lists... Building dependency tree... Need to get 6 B of source archives. -Get:1 http://localhost:8080 pkg-mixed-sha2-bad 1.0 (tar) [3 B] -Err:1 http://localhost:8080 pkg-mixed-sha2-bad 1.0 (tar) +Get:1 http://localhost:${APTHTTPPORT} pkg-mixed-sha2-bad 1.0 (tar) [3 B] +Err:1 http://localhost:${APTHTTPPORT} pkg-mixed-sha2-bad 1.0 (tar) Hash Sum mismatch -Get:2 http://localhost:8080 pkg-mixed-sha2-bad 1.0 (dsc) [3 B] -E: Failed to fetch http://localhost:8080/pkg-mixed-sha2-bad_1.0.tar.gz Hash Sum mismatch +Get:2 http://localhost:${APTHTTPPORT} pkg-mixed-sha2-bad 1.0 (dsc) [3 B] +E: Failed to fetch http://localhost:${APTHTTPPORT}/pkg-mixed-sha2-bad_1.0.tar.gz Hash Sum mismatch -E: Failed to fetch some archives.' aptget source -d pkg-mixed-sha2-bad +E: Failed to fetch some archives." aptget source -d pkg-mixed-sha2-bad msgtest 'Only dsc file is downloaded as the tar has hashsum mismatch' 'pkg-mixed-sha2-bad' testsuccess --nomsg test -e pkg-mixed-sha2-bad_1.0.dsc -a ! -e pkg-mixed-sha2-bad_1.0.tar.gz -- cgit v1.2.3