summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/framework30
-rwxr-xr-xtest/integration/test-apt-cdrom2
-rwxr-xr-xtest/integration/test-apt-get-changelog25
-rwxr-xr-xtest/integration/test-apt-get-download12
-rwxr-xr-xtest/integration/test-apt-get-source-authenticated7
-rwxr-xr-xtest/integration/test-apt-helper21
-rwxr-xr-xtest/integration/test-apt-update-nofallback2
-rwxr-xr-xtest/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted10
-rwxr-xr-xtest/integration/test-bug-738785-switch-protocol12
-rwxr-xr-xtest/integration/test-compressed-indexes8
-rwxr-xr-xtest/integration/test-partial-file-support31
-rwxr-xr-xtest/integration/test-sourceslist-trusted-options10
-rwxr-xr-xtest/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum2
13 files changed, 104 insertions, 68 deletions
diff --git a/test/integration/framework b/test/integration/framework
index d576712e5..23ff0983b 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -32,7 +32,7 @@ msgprintf() {
printf "$START " "$1"
shift
while [ -n "$1" ]; do
- printf "$MIDDLE " "$(echo "$1" | sed -e 's#^apt\([cgfs]\)#apt-\1#')"
+ printf "$MIDDLE " "$(echo "$1" | sed -e 's#^apt\([cfghs]\)#apt-\1#')"
shift
done
fi
@@ -57,9 +57,9 @@ msgskip() {
msgfail() {
if [ $# -gt 0 ]; then printf "${CFAIL}FAIL: $*${CNORMAL}\n" >&2;
else printf "${CFAIL}FAIL${CNORMAL}\n" >&2; fi
- if [ -n "$APT_DEBUG_TESTS" ]; then
- bash
- fi
+ if [ -n "$APT_DEBUG_TESTS" ]; then
+ $SHELL
+ fi
EXIT_CODE=$((EXIT_CODE+1));
}
@@ -184,10 +184,12 @@ setupenvironment() {
addtrap "cd /; rm -rf $TMPWORKINGDIRECTORY;"
msgninfo "Preparing environment for ${CCMD}$(basename $0)${CINFO} in ${TMPWORKINGDIRECTORY}… "
+ mkdir -m 700 "${TMPWORKINGDIRECTORY}/downloaded"
if [ "$(id -u)" = '0' ]; then
# relax permissions so that running as root with user switching works
umask 022
- chmod o+rx "$TMPWORKINGDIRECTORY"
+ chmod 711 "$TMPWORKINGDIRECTORY"
+ chown _apt:root "${TMPWORKINGDIRECTORY}/downloaded"
fi
TESTDIRECTORY=$(readlink -f $(dirname $0))
@@ -1061,7 +1063,7 @@ downloadfile() {
}
checkdiff() {
- local DIFFTEXT="$(command diff -u "$@" | sed -e '/^---/ d' -e '/^+++/ d' -e '/^@@/ d')"
+ local DIFFTEXT="$(command diff -u "$@" 2>&1 | sed -e '/^---/ d' -e '/^+++/ d' -e '/^@@/ d')"
if [ -n "$DIFFTEXT" ]; then
echo >&2
echo >&2 "$DIFFTEXT"
@@ -1307,7 +1309,7 @@ testaccessrights() {
testwebserverlaststatuscode() {
local DOWNLOG='rootdir/tmp/webserverstatus-testfile.log'
- local STATUS='rootdir/tmp/webserverstatus-statusfile.log'
+ local STATUS='downloaded/webserverstatus-statusfile.log'
rm -f "$DOWNLOG" "$STATUS"
msgtest 'Test last status code from the webserver was' "$1"
downloadfile "http://localhost:8080/_config/find/aptwebserver::last-status-code" "$STATUS" > "$DOWNLOG"
@@ -1353,20 +1355,20 @@ aptautotest() {
shift 3
# save and restore the *.output files from other tests
# as we might otherwise override them in these automatic tests
- rm -rf rootdir/tmp-before
- mv rootdir/tmp rootdir/tmp-before
- mkdir rootdir/tmp
+ rm -rf ${TMPWORKINGDIRECTORY}/rootdir/tmp-before
+ mv ${TMPWORKINGDIRECTORY}/rootdir/tmp ${TMPWORKINGDIRECTORY}/rootdir/tmp-before
+ mkdir ${TMPWORKINGDIRECTORY}/rootdir/tmp
$AUTOTEST "$TESTCALL" "$@"
- rm -rf rootdir/tmp-aptautotest
- mv rootdir/tmp rootdir/tmp-aptautotest
- mv rootdir/tmp-before rootdir/tmp
+ rm -rf ${TMPWORKINGDIRECTORY}/rootdir/tmp-aptautotest
+ mv ${TMPWORKINGDIRECTORY}/rootdir/tmp ${TMPWORKINGDIRECTORY}/rootdir/tmp-aptautotest
+ mv ${TMPWORKINGDIRECTORY}/rootdir/tmp-before ${TMPWORKINGDIRECTORY}/rootdir/tmp
fi
}
aptautotest_aptget_update() {
if ! test -d "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists"; then return; fi
# all copied files are properly chmodded
- find "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists" -maxdepth 1 -type f | while read file; do
+ for file in $(find "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/lists" -maxdepth 1 -type f); do
testfilestats "$file" '%U:%G:%a' '=' "${USER}:${USER}:644"
done
}
diff --git a/test/integration/test-apt-cdrom b/test/integration/test-apt-cdrom
index 2220a290c..4489143e4 100755
--- a/test/integration/test-apt-cdrom
+++ b/test/integration/test-apt-cdrom
@@ -99,6 +99,7 @@ Conf testing:i386 (0.8.15 stable [i386])' aptget install testing:i386 -s
testsuccess aptget purge testing:i386 -y
testdpkgnotinstalled testing:i386
+ cd downloaded
rm -f testing_0.8.15_amd64.deb
testsuccess aptget download testing
testsuccess test -s testing_0.8.15_amd64.deb
@@ -108,6 +109,7 @@ Conf testing:i386 (0.8.15 stable [i386])' aptget install testing:i386 -s
testsuccess aptget source testing --dsc-only -d
testsuccess test -s testing_0.8.15.dsc
rm -f testing_0.8.15.dsc
+ cd - >/dev/null
}
testcdromusage
diff --git a/test/integration/test-apt-get-changelog b/test/integration/test-apt-get-changelog
index 76a32a122..648dccf40 100755
--- a/test/integration/test-apt-get-changelog
+++ b/test/integration/test-apt-get-changelog
@@ -21,23 +21,28 @@ chmod -R -w rootdir/var/cache/apt/archives
echo 'Apt::Changelogs::Server "http://localhost:8080/";' > rootdir/etc/apt/apt.conf.d/changelog.conf
-testequal "'http://localhost:8080//pool/apt_1.0/changelog'" aptget changelog apt --print-uris
+testequal "'http://localhost:8080/pool/apt_1.0/changelog'" aptget changelog apt --print-uris
-testequal "'http://localhost:8080//pool/apt_1.0/changelog'
-'http://localhost:8080//pool/apt_1.0/changelog'" aptget changelog apt apt --print-uris
+testequal "'http://localhost:8080/pool/apt_1.0/changelog'
+'http://localhost:8080/pool/apt_1.0/changelog'" aptget changelog apt apt --print-uris
+
+cd downloaded
testsuccess aptget changelog apt -qq
-testfileequal 'rootdir/tmp/testsuccess.output' "$(cat aptarchive/pool/apt_1.0/changelog)"
+testfileequal '../rootdir/tmp/testsuccess.output' "$(cat ../aptarchive/pool/apt_1.0/changelog)"
testsuccess aptget changelog apt -d
-testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)"
-rm -f apt.changelog aptarchive/pool/apt_1.0/changelog
+testfileequal 'apt.changelog' "$(cat ../aptarchive/pool/apt_1.0/changelog)"
+testfilestats 'apt.changelog' '%U:%G:%a' '=' "${USER}:${USER}:644"
+rm -f apt.changelog ../aptarchive/pool/apt_1.0/changelog
-testequal "$(cat aptarchive/pool/apt_1.0.changelog)" aptget changelog apt \
+testequal "$(cat ../aptarchive/pool/apt_1.0.changelog)" aptget changelog apt \
-qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/'
testsuccess aptget changelog apt -d
-testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)"
-rm -f apt.changelog aptarchive/pool/apt_1.0.changelog
+testfileequal 'apt.changelog' "$(cat ../aptarchive/pool/apt_1.0.changelog)"
+testfilestats 'apt.changelog' '%U:%G:%a' '=' "${USER}:${USER}:644"
+rm -f apt.changelog ../aptarchive/pool/apt_1.0.changelog
-testequal 'E: changelog download failed' aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/'
+testequal 'E: changelog download failed' aptget changelog apt -qq -d -o APT::Changelogs::Server='http://not-on-the-main-server:8080/'
+testfailure test -e apt.changelog
diff --git a/test/integration/test-apt-get-download b/test/integration/test-apt-get-download
index 48086d808..6503bbd1c 100755
--- a/test/integration/test-apt-get-download
+++ b/test/integration/test-apt-get-download
@@ -44,7 +44,10 @@ testdownload() {
}
# normal case as "root"
+OLDPWD="$(pwd)"
+cd downloaded
testdownload apt_2.0_all.deb apt
+cd "$OLDPWD"
# simulate normal user with non-existent root-owned directories
rm -rf rootdir/var/cache/apt/archives/
@@ -52,14 +55,18 @@ mkdir rootdir/var/cache/apt/archives/
addtrap 'prefix' "chmod -f -R +w $PWD/rootdir/var/cache/apt/archives || true;"
chmod -R -w rootdir/var/cache/apt/archives
+OLDPWD="$(pwd)"
+cd downloaded
+
# normal case(es)
testdownload apt_1.0_all.deb apt stable
testdownload apt_2.0_all.deb apt
-DEBFILE="$(readlink -f aptarchive)/pool/apt_2.0_all.deb"
+DEBFILE="$(readlink -f ../aptarchive)/pool/apt_2.0_all.deb"
testequal "'file://${DEBFILE}' apt_2.0_all.deb $(stat -c%s $DEBFILE) SHA512:$(sha512sum $DEBFILE | cut -d' ' -f 1)" aptget download apt --print-uris
# deb:677887
+testequal "E: Can't find a source to download version '1.0' of 'vrms:i386'" aptget download vrms --print-uris
testequal "E: Can't find a source to download version '1.0' of 'vrms:i386'" aptget download vrms
# deb:736962
@@ -74,6 +81,7 @@ testsuccess aptget download apt apt apt/unstable apt=2.0
testsuccess test -s apt_2.0_all.deb
# restore "root" rights
+cd "$OLDPWD"
chmod -f -R +w $PWD/rootdir/var/cache/apt/archives
rm -rf rootdir/var/cache/apt/archives/
@@ -86,5 +94,7 @@ testsuccess aptget install -d apt
testsuccess test -s rootdir/var/cache/apt/archives/apt_2.0_all.deb
testaccessrights 'aptarchive/pool/apt_2.0_all.deb' '644'
mv aptarchive/pool/apt_2.0_all.deb aptarchive/pool/apt_2.0_all.deb.gone
+cd downloaded
testdownload apt_2.0_all.deb apt
+cd "$OLDPWD"
mv aptarchive/pool/apt_2.0_all.deb.gone aptarchive/pool/apt_2.0_all.deb
diff --git a/test/integration/test-apt-get-source-authenticated b/test/integration/test-apt-get-source-authenticated
index fedfc8308..f68c32386 100755
--- a/test/integration/test-apt-get-source-authenticated
+++ b/test/integration/test-apt-get-source-authenticated
@@ -25,7 +25,10 @@ testwarning aptget update --allow-insecure-repositories
# this all should fail
testfailure aptget install -y foo
+cd downloaded
testfailure aptget source foo
-
+testfailure test -e foo_2.0.dsc
# allow overriding the warning
-testsuccess aptget source --allow-unauthenticated foo
+testsuccess aptget source --allow-unauthenticated foo -o Debug::pkgAcquire::Worker=1
+testsuccess test -s foo_2.0.dsc -a -L foo_2.0.dsc
+testaccessrights 'foo_2.0.dsc' '777'
diff --git a/test/integration/test-apt-helper b/test/integration/test-apt-helper
index 42c40bb9e..06e497ff7 100755
--- a/test/integration/test-apt-helper
+++ b/test/integration/test-apt-helper
@@ -13,23 +13,23 @@ test_apt_helper_download() {
echo 'foo' > aptarchive/foo
msgtest 'apt-file download-file' 'md5sum'
- apthelper -qq download-file http://localhost:8080/foo foo2 MD5Sum:d3b07384d113edec49eaa6238ad5ff00 && msgpass || msgfail
- testfileequal foo2 'foo'
+ apthelper -qq download-file http://localhost:8080/foo downloaded/foo2 MD5Sum:d3b07384d113edec49eaa6238ad5ff00 && msgpass || msgfail
+ testfileequal downloaded/foo2 'foo'
msgtest 'apt-file download-file' 'sha1'
- apthelper -qq download-file http://localhost:8080/foo foo1 SHA1:f1d2d2f924e986ac86fdf7b36c94bcdf32beec15 && msgpass || msgfail
- testfileequal foo1 'foo'
+ apthelper -qq download-file http://localhost:8080/foo downloaded/foo1 SHA1:f1d2d2f924e986ac86fdf7b36c94bcdf32beec15 && msgpass || msgfail
+ testfileequal downloaded/foo1 'foo'
msgtest 'apt-file download-file' 'sha256'
- apthelper -qq download-file http://localhost:8080/foo foo3 SHA256:b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c && msgpass || msgfail
- testfileequal foo3 'foo'
+ apthelper -qq download-file http://localhost:8080/foo downloaded/foo3 SHA256:b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c && msgpass || msgfail
+ testfileequal downloaded/foo3 'foo'
msgtest 'apt-file download-file' 'no-hash'
- apthelper -qq download-file http://localhost:8080/foo foo4 && msgpass || msgfail
- testfileequal foo4 'foo'
+ apthelper -qq download-file http://localhost:8080/foo downloaded/foo4 && msgpass || msgfail
+ testfileequal downloaded/foo4 'foo'
msgtest 'apt-file download-file' 'wrong hash'
- if ! apthelper -qq download-file http://localhost:8080/foo foo5 MD5Sum:aabbcc 2>&1 2> download.stderr; then
+ if ! apthelper -qq download-file http://localhost:8080/foo downloaded/foo5 MD5Sum:aabbcc 2>&1 2> download.stderr; then
msgpass
else
msgfail
@@ -37,7 +37,8 @@ test_apt_helper_download() {
testfileequal download.stderr 'E: Failed to fetch http://localhost:8080/foo Hash Sum mismatch
E: Download Failed'
- testfileequal foo5.FAILED 'foo'
+ testfileequal downloaded/foo5.FAILED 'foo'
+ testfailure test -e downloaded/foo5
}
test_apt_helper_detect_proxy() {
diff --git a/test/integration/test-apt-update-nofallback b/test/integration/test-apt-update-nofallback
index 831fc67eb..e82a976a6 100755
--- a/test/integration/test-apt-update-nofallback
+++ b/test/integration/test-apt-update-nofallback
@@ -195,7 +195,7 @@ test_release_gpg_to_invalid_release_release_gpg()
testequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file: unstable Release.gpg: The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
-W: Failed to fetch file:${APTARCHIVE}/dists/unstable/Release.gpg
+W: Failed to fetch file:${APTARCHIVE}/dists/unstable/Release.gpg The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
W: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
diff --git a/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted b/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted
index 164dca070..582e1bf5e 100755
--- a/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted
+++ b/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted
@@ -24,6 +24,7 @@ testfilemissing() {
testrun() {
rm -rf rootdir/var/lib/apt
+ cd downloaded
if [ "$1" = 'trusted' ]; then
testsuccess aptget update
@@ -43,18 +44,19 @@ testrun() {
testfileexists 'cool_1.0_i386.deb'
fi
- mv aptarchive/pool/cool_1.0_i386.deb aptarchive/pool/cool_1.0_i386.deb.bak
- echo 'this is not a good package' > aptarchive/pool/cool_1.0_i386.deb
+ mv ../aptarchive/pool/cool_1.0_i386.deb ../aptarchive/pool/cool_1.0_i386.deb.bak
+ echo 'this is not a good package' > ../aptarchive/pool/cool_1.0_i386.deb
testfailure aptget download cool
testfilemissing cool_1.0_i386.deb
testfailure aptget download cool --allow-unauthenticated # unauthenticated doesn't mean unchecked
testfilemissing cool_1.0_i386.deb
- rm -f aptarchive/pool/cool_1.0_i386.deb
- mv aptarchive/pool/cool_1.0_i386.deb.bak aptarchive/pool/cool_1.0_i386.deb
+ rm -f ../aptarchive/pool/cool_1.0_i386.deb
+ mv ../aptarchive/pool/cool_1.0_i386.deb.bak ../aptarchive/pool/cool_1.0_i386.deb
testsuccess aptget download cool --allow-unauthenticated
testfileexists 'cool_1.0_i386.deb'
+ cd - >/dev/null
}
testrun 'trusted'
diff --git a/test/integration/test-bug-738785-switch-protocol b/test/integration/test-bug-738785-switch-protocol
index f450e5e5a..e50c84dbf 100755
--- a/test/integration/test-bug-738785-switch-protocol
+++ b/test/integration/test-bug-738785-switch-protocol
@@ -25,6 +25,7 @@ downloadfile 'http://localhost:8080/pool/apt_1.0/changelog' changelog >/dev/null
echo 'Apt::Changelogs::Server "http://localhost:8080/redirectme";' > rootdir/etc/apt/apt.conf.d/changelog.conf
testequal "'http://localhost:8080/redirectme/pool/apt_1.0/changelog'" aptget changelog apt --print-uris
+cd downloaded
testsuccess aptget changelog apt -d
testsuccess test -s apt.changelog
rm -f apt.changelog
@@ -32,6 +33,7 @@ rm -f apt.changelog
testsuccess aptget download apt
testsuccess test -s apt_1.0_all.deb
rm apt_1.0_all.deb
+cd - >/dev/null
testsuccess aptget install apt -y
testdpkginstalled 'apt'
@@ -49,15 +51,11 @@ rm https
cd - >/dev/null
echo "Dir::Bin::Methods \"${COPYMETHODS}\";" >> aptconfig.conf
-if [ "$(id -u)" = '0' ]; then
- testequal "Can't drop privileges for downloading as file '$(pwd)/apt_1.0_all.deb' couldn't be accessed by user '_apt'.
-E: The method driver $(pwd)/rootdir/usr/lib/apt/methods/https could not be found.
-N: Is the package apt-transport-https installed?" aptget download apt -q=0
-else
- testequal "E: The method driver $(pwd)/rootdir/usr/lib/apt/methods/https could not be found.
+cd downloaded
+testequal "E: The method driver $(readlink -f './../')/rootdir/usr/lib/apt/methods/https could not be found.
N: Is the package apt-transport-https installed?" aptget download apt -q=0
-fi
testsuccess test ! -e apt_1.0_all.deb
+cd - >/dev/null
# revert to all methods
rm -rf rootdir/$COPYMETHODS
diff --git a/test/integration/test-compressed-indexes b/test/integration/test-compressed-indexes
index 72b262e84..92e7c0e84 100755
--- a/test/integration/test-compressed-indexes
+++ b/test/integration/test-compressed-indexes
@@ -58,9 +58,11 @@ testrun() {
msgpass
fi
msgtest 'Check if package is downloadable'
+ cd downloaded
testsuccess --nomsg aptget download testpkg
msgtest '\tdeb file is present'; testsuccess --nomsg test -f testpkg_1.0_i386.deb
rm testpkg_1.0_i386.deb
+ cd - >/dev/null
testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
@@ -79,10 +81,12 @@ Conf testpkg (1.0 unstable [i386])' aptget install testpkg -s
testequal "$GOODSHOWSRC" aptcache showsrc testpkg
aptget clean
msgtest 'Check if the source is aptgetable'
+ cd downloaded
testsuccess --nomsg aptget source testpkg
- msgtest '\tdsc file is present'; testsuccess --nomsg test -f testpkg_1.0.dsc
- msgtest '\tdirectory is present'; testsuccess --nomsg test -d testpkg-1.0
+ testsuccess test -s testpkg_1.0.dsc
+ testsuccess test -d testpkg-1.0
rm -rf testpkg-1.0*
+ cd - >/dev/null
testequal "$(aptcache show testpkg -o Acquire::Languages=none)
" aptcache dumpavail
}
diff --git a/test/integration/test-partial-file-support b/test/integration/test-partial-file-support
index 5ab326def..98b2f242a 100755
--- a/test/integration/test-partial-file-support
+++ b/test/integration/test-partial-file-support
@@ -52,36 +52,37 @@ cp -a ${TESTDIR}/framework $TESTFILE
testrun() {
webserverconfig 'aptwebserver::support::range' 'true'
+ local DOWN='./downloaded/testfile'
- copysource $TESTFILE 0 ./testfile
- testdownloadfile 'no data' "${1}/testfile" './testfile' '='
+ copysource $TESTFILE 0 $DOWN
+ testdownloadfile 'no data' "${1}/testfile" "$DOWN" '='
testwebserverlaststatuscode '200' "$DOWNLOADLOG"
- copysource $TESTFILE 20 ./testfile
- testdownloadfile 'valid partial data' "${1}/testfile" './testfile' '='
+ copysource $TESTFILE 20 $DOWN
+ testdownloadfile 'valid partial data' "${1}/testfile" "$DOWN" '='
testwebserverlaststatuscode '206' "$DOWNLOADLOG"
- copysource /dev/zero 20 ./testfile
- testdownloadfile 'invalid partial data' "${1}/testfile" './testfile' '!='
+ copysource /dev/zero 20 $DOWN
+ testdownloadfile 'invalid partial data' "${1}/testfile" "$DOWN" '!='
testwebserverlaststatuscode '206' "$DOWNLOADLOG"
- copysource $TESTFILE 1M ./testfile
- testdownloadfile 'completely downloaded file' "${1}/testfile" './testfile' '='
+ copysource $TESTFILE 1M $DOWN
+ testdownloadfile 'completely downloaded file' "${1}/testfile" "$DOWN" '='
testwebserverlaststatuscode '416' "$DOWNLOADLOG"
- copysource /dev/zero 1M ./testfile
- testdownloadfile 'too-big partial file' "${1}/testfile" './testfile' '='
+ copysource /dev/zero 1M $DOWN
+ testdownloadfile 'too-big partial file' "${1}/testfile" "$DOWN" '='
testwebserverlaststatuscode '200' "$DOWNLOADLOG"
- copysource /dev/zero 20 ./testfile
- touch ./testfile
- testdownloadfile 'old data' "${1}/testfile" './testfile' '='
+ copysource /dev/zero 20 $DOWN
+ touch $DOWN
+ testdownloadfile 'old data' "${1}/testfile" "$DOWN" '='
testwebserverlaststatuscode '200' "$DOWNLOADLOG"
webserverconfig 'aptwebserver::support::range' 'false'
- copysource $TESTFILE 20 ./testfile
- testdownloadfile 'no server support' "${1}/testfile" './testfile' '='
+ copysource $TESTFILE 20 $DOWN
+ testdownloadfile 'no server support' "${1}/testfile" "$DOWN" '='
testwebserverlaststatuscode '200' "$DOWNLOADLOG"
}
diff --git a/test/integration/test-sourceslist-trusted-options b/test/integration/test-sourceslist-trusted-options
index 28415dd62..55d4e0233 100755
--- a/test/integration/test-sourceslist-trusted-options
+++ b/test/integration/test-sourceslist-trusted-options
@@ -20,6 +20,7 @@ foo/testing 2 amd64
foo/stable 1 amd64
' apt list foo -a
+ cd downloaded
rm -f foo_1_amd64.deb foo_2_amd64.deb
testsuccess aptget download foo "$@"
testsuccess test -s foo_1_amd64.deb -o -s foo_2_amd64.deb
@@ -27,6 +28,7 @@ foo/stable 1 amd64
rm -f foo_1.dsc foo_2.dsc
testsuccess aptget source foo --dsc-only -d "$@"
testsuccess test -s foo_1.dsc -o -s foo_2.dsc
+ cd - >/dev/null
}
everythingfails() {
@@ -39,18 +41,22 @@ foo/stable 1 amd64
foo
E: Some packages could not be authenticated'
+ cd downloaded
rm -f foo_1_amd64.deb foo_2_amd64.deb
testfailure aptget download foo "$@"
- testequal "$WARNING" tail -n 3 rootdir/tmp/testfailure.output
+ testequal "$WARNING" tail -n 3 ../rootdir/tmp/testfailure.output
testfailure test -s foo_1_amd64.deb -o -s foo_2_amd64.deb
rm -f foo_1.dsc foo_2.dsc
testfailure aptget source foo --dsc-only -d "$@"
- testequal "$WARNING" tail -n 3 rootdir/tmp/testfailure.output
+ testequal "$WARNING" tail -n 3 ../rootdir/tmp/testfailure.output
testfailure test -s foo_1.dsc -o -s foo_2.dsc
+ cd - >/dev/null
}
cp -a rootdir/etc/apt/sources.list.d/ rootdir/etc/apt/sources.list.d.bak/
+echo 'Debug::Acquire::Transaction "true";
+Debug::pkgAcquire::Worker "true";' > rootdir/etc/apt/apt.conf.d/00debugging
aptgetupdate() {
rm -rf rootdir/var/lib/apt/lists
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 8c9c9c767..574183b0a 100755
--- a/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum
+++ b/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum
@@ -141,6 +141,8 @@ setupaptarchive
changetowebserver
testsuccess aptget update
+cd downloaded
+
testok() {
rm -f ${1}_1.0.dsc ${1}_1.0.tar.gz
testequal "Reading package lists...