]>
git.saurik.com Git - apt.git/blob - test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted
4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
7 configarchitecture 'i386'
9 buildsimplenativepackage 'cool' 'i386' '1.0' 'unstable'
11 setupaptarchive --no-update
14 msgtest 'Test for existence of file' "$1"
15 test -e "$1" && msgpass || msgfail
20 msgtest 'Test for non-existance of file' "$1"
21 test -e "$1" && msgfail || msgpass
26 rm -rf rootdir/var/lib/apt
29 if [ "$1" = 'trusted' ]; then
30 testsuccess aptget update
32 testsuccess aptget download cool
33 testfileexists 'cool_1.0_i386.deb'
35 testsuccess aptget download cool --allow-unauthenticated
36 testfileexists 'cool_1.0_i386.deb'
38 testwarning aptget update --allow-insecure-repositories
40 testfailure aptget download cool
41 testfilemissing 'cool_1.0_i386.deb'
43 testsuccess aptget download cool --allow-unauthenticated
44 testfileexists 'cool_1.0_i386.deb'
47 mv ../aptarchive/pool/cool_1.0_i386.deb ../aptarchive/pool/cool_1.0_i386.deb.bak
48 echo 'this is not a good package' > ../aptarchive/pool/cool_1.0_i386.deb
49 testfailure aptget download cool
50 testfilemissing cool_1.0_i386.deb
52 testfailure aptget download cool --allow-unauthenticated # unauthenticated doesn't mean unchecked
53 testfilemissing cool_1.0_i386.deb
55 rm -f ../aptarchive/pool/cool_1.0_i386.deb
56 mv ../aptarchive/pool/cool_1.0_i386.deb.bak ../aptarchive/pool/cool_1.0_i386.deb
57 testsuccess aptget download cool --allow-unauthenticated
58 testfileexists 'cool_1.0_i386.deb'
64 find aptarchive/ \( -name 'Release.gpg' -o -name 'InRelease' \) -delete