X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/87d6947d51717e8b0e975d913986161598a7259a..61db48241f2d46697a291bfedaf398a1ca9a70e3:/test/integration/test-bug-738785-switch-protocol?ds=sidebyside diff --git a/test/integration/test-bug-738785-switch-protocol b/test/integration/test-bug-738785-switch-protocol index 2f8a7ae5d..fa6702eb0 100755 --- a/test/integration/test-bug-738785-switch-protocol +++ b/test/integration/test-bug-738785-switch-protocol @@ -1,8 +1,8 @@ #!/bin/sh set -e -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" setupenvironment configarchitecture "i386" @@ -22,7 +22,7 @@ testsuccess aptget update -o Debug::Acquire::http=1 -o Debug::Acquire::https=1 - msgtest 'Test that the webserver does not answer' 'http requests' downloadfile "http://localhost:${APTHTTPPORT}/pool/main/a/apt/apt_1.0/changelog" changelog >/dev/null 2>&1 && msgfail || msgpass -echo "Acquire::Changelogs::URI::Label::Testcases \"http://localhost:${APTHTTPPORT}/redirectme/pool/CHANGEPATH/changelog\";" > rootdir/etc/apt/apt.conf.d/changelog.conf +echo "Acquire::Changelogs::URI::Label::Testcases \"http://localhost:${APTHTTPPORT}/redirectme/pool/@CHANGEPATH@/changelog\";" > rootdir/etc/apt/apt.conf.d/changelog.conf testsuccessequal "'http://localhost:${APTHTTPPORT}/redirectme/pool/main/a/apt/apt_1.0/changelog' apt.changelog" aptget changelog apt --print-uris cd downloaded @@ -45,7 +45,7 @@ rm "$NEWMETHODS" mkdir "$NEWMETHODS" backupIFS="$IFS" IFS="$(printf "\n\b")" -for METH in $(find "$OLDMETHODS" ! -type d); do +for METH in $(find "$OLDMETHODS" -maxdepth 1 ! -type d); do ln -s "$OLDMETHODS/$(basename "$METH")" "$NEWMETHODS" done IFS="$backupIFS" @@ -63,4 +63,4 @@ ln -s "$OLDMETHODS/https" "$NEWMETHODS" # check that downgrades from https to http are not allowed webserverconfig 'aptwebserver::support::http' 'true' sed -i -e "s#:${APTHTTPPORT}/redirectme#:${APTHTTPSPORT}/downgrademe#" -e 's# http:# https:#' rootdir/etc/apt/sources.list.d/* -testfailure aptget update --allow-insecure-repositories +testfailure aptget update --allow-insecure-repositories -o Acquire::https::Timeout=1