X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/0977f81757f42889a9edb761061529041afe0a06..b0be0e09cfbbcb033eb0b92eaf17ac31a6b9f423:/test/integration/test-sourceslist-trusted-options?ds=inline diff --git a/test/integration/test-sourceslist-trusted-options b/test/integration/test-sourceslist-trusted-options index c954f2f4f..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,32 +41,36 @@ 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 # note that insecure with trusted=yes are allowed # as the trusted=yes indicates that security is provided by # something above the understanding of apt - testsuccess aptget update --no-allow-insecure-repositories + ${1:-testsuccess} aptget update --no-allow-insecure-repositories } insecureaptgetupdate() { rm -rf rootdir/var/lib/apt/lists testfailure aptget update --no-allow-insecure-repositories rm -rf rootdir/var/lib/apt/lists - testsuccess aptget update --allow-insecure-repositories + testwarning aptget update --allow-insecure-repositories } msgmsg 'Test without trusted option and good sources' @@ -103,7 +109,7 @@ everythingsucceeds -t testing msgmsg 'Test with trusted=yes option and good and unsigned sources' cp -a rootdir/etc/apt/sources.list.d.bak/* rootdir/etc/apt/sources.list.d/ sed -i 's#^deb\(-src\)\? #deb\1 [trusted=yes] #' rootdir/etc/apt/sources.list.d/* -aptgetupdate +aptgetupdate 'testwarning' everythingsucceeds everythingsucceeds -t stable everythingsucceeds -t testing @@ -128,7 +134,7 @@ everythingsucceeds -t testing msgmsg 'Test with trusted=yes option and good and unknown sources' cp -a rootdir/etc/apt/sources.list.d.bak/* rootdir/etc/apt/sources.list.d/ sed -i 's#^deb\(-src\)\? #deb\1 [trusted=yes] #' rootdir/etc/apt/sources.list.d/* -aptgetupdate +aptgetupdate 'testwarning' everythingsucceeds everythingsucceeds -t stable everythingsucceeds -t testing @@ -154,7 +160,7 @@ everythingsucceeds -t testing msgmsg 'Test with trusted=yes option and good and expired sources' cp -a rootdir/etc/apt/sources.list.d.bak/* rootdir/etc/apt/sources.list.d/ sed -i 's#^deb\(-src\)\? #deb\1 [trusted=yes] #' rootdir/etc/apt/sources.list.d/* -aptgetupdate +aptgetupdate 'testwarning' everythingsucceeds everythingsucceeds -t stable everythingsucceeds -t testing @@ -181,7 +187,7 @@ everythingfails -t testing msgmsg 'Test with trusted=yes option and unsigned and good sources' cp -a rootdir/etc/apt/sources.list.d.bak/* rootdir/etc/apt/sources.list.d/ sed -i 's#^deb\(-src\)\? #deb\1 [trusted=yes] #' rootdir/etc/apt/sources.list.d/* -aptgetupdate +aptgetupdate 'testwarning' everythingsucceeds everythingsucceeds -t stable everythingsucceeds -t testing