summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/integration/framework10
-rwxr-xr-xtest/integration/test-partial-file-support12
2 files changed, 14 insertions, 8 deletions
diff --git a/test/integration/framework b/test/integration/framework
index 20f3487cc..6a2a78c83 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -192,6 +192,7 @@ setupenvironment() {
fi
echo "DPKG::options:: \"--log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log\";" >> aptconfig.conf
echo 'quiet::NoUpdate "true";' >> aptconfig.conf
+ echo "Acquire::https::CaInfo \"${TESTDIR}/apt.pem\";" > rootdir/etc/apt/apt.conf.d/99https
export LC_ALL=C
export PATH="${PATH}:/usr/local/sbin:/usr/sbin:/sbin"
configcompression '.' 'gz' #'bz2' 'lzma' 'xz'
@@ -799,6 +800,11 @@ rewritesourceslist() {
}
changetowebserver() {
+ if [ "$1" != '--no-rewrite' ]; then
+ rewritesourceslist 'http://localhost:8080/'
+ else
+ shift
+ fi
local LOG='/dev/null'
if test -x ${BUILDDIRECTORY}/aptwebserver; then
cd aptarchive
@@ -812,9 +818,6 @@ changetowebserver() {
else
msgdie 'You have to build aptwerbserver or install a webserver'
fi
- if [ "$1" != '--no-rewrite' ]; then
- rewritesourceslist 'http://localhost:8080/'
- fi
}
changetohttpswebserver() {
@@ -826,6 +829,7 @@ changetohttpswebserver() {
fi
echo "pid = ${TMPWORKINGDIRECTORY}/aptarchive/stunnel.pid
cert = ${TESTDIRECTORY}/apt.pem
+output = /dev/null
[https]
accept = 4433
diff --git a/test/integration/test-partial-file-support b/test/integration/test-partial-file-support
index 8d1c51ae0..b176cc15e 100755
--- a/test/integration/test-partial-file-support
+++ b/test/integration/test-partial-file-support
@@ -18,7 +18,7 @@ testdownloadfile() {
rm -f "$DOWNLOG"
msgtest "Testing download of file $2 with" "$1"
if ! downloadfile "$2" "$3" > "$DOWNLOG"; then
- cat "$DOWNLOG"
+ cat >&2 "$DOWNLOG"
msgfail
else
msgpass
@@ -40,21 +40,23 @@ testdownloadfile() {
if [ "$EXPECTED" "$4" "$hash" ]; then
msgpass
else
- cat "$DOWNLOG"
+ cat >&2 "$DOWNLOG"
msgfail "expected: $EXPECTED ; got: $hash"
fi
done
}
testwebserverlaststatuscode() {
- STATUS="$(mktemp)"
+ local DOWNLOG='download-testfile.log'
+ rm -f "$DOWNLOG"
+ local STATUS="$(mktemp)"
addtrap "rm $STATUS;"
msgtest 'Test last status code from the webserver was' "$1"
- downloadfile "http://localhost:8080/_config/find/aptwebserver::last-status-code" "$STATUS" >/dev/null
+ downloadfile "http://localhost:8080/_config/find/aptwebserver::last-status-code" "$STATUS" > "$DOWNLOG"
if [ "$(cat "$STATUS")" = "$1" ]; then
msgpass
else
- cat download-testfile.log
+ cat >&2 "$DOWNLOG"
msgfail "Status was $(cat "$STATUS")"
fi
}