]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-pdiff-usage
do not move not-failed pdiff-patches into CWD on failure
[apt.git] / test / integration / test-pdiff-usage
index 253abb92cf7841519f5bcfb3be82e5fc6536730d..98d75d8947bafb34f1a10a5f6bbd859b9fdf928e 100755 (executable)
@@ -164,6 +164,19 @@ SHA256-Download:
        testsuccessequal "$(cat Packages-future)
 " aptcache show apt newstuff futurestuff
 
+       # we reuse the archive state of the previous test here
+       msgmsg "Testcase: downloading a patch fails, but successful fallback: $*"
+       rm -rf rootdir/var/lib/apt/lists
+       cp -a rootdir/var/lib/apt/lists-bak rootdir/var/lib/apt/lists
+       cp Packages-future aptarchive/Packages
+       rm "${PATCHFILE}.gz"
+       testsuccess apt update "$@"
+       cp rootdir/tmp/testsuccess.output patchdownload.output
+       testsuccess grep '^Falling back to normal index file acquire' patchdownload.output
+       testnopackage oldstuff
+       testsuccessequal "$(cat Packages-future)
+" aptcache show apt newstuff futurestuff
+
        msgmsg "Testcase: patch applying fails, but successful fallback: $*"
        rm -rf rootdir/var/lib/apt/lists
        cp -a rootdir/var/lib/apt/lists-bak rootdir/var/lib/apt/lists