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
28 if [ "$1" = 'trusted' ]; then
29 testsuccess aptget update
31 testsuccess aptget download cool
32 testfileexists
'cool_1.0_i386.deb'
34 testsuccess aptget download cool
--allow-unauthenticated
35 testfileexists
'cool_1.0_i386.deb'
37 testsuccess aptget update
--allow-unauthenticated
39 testfailure aptget download cool
40 testfilemissing
'cool_1.0_i386.deb'
42 testsuccess aptget download cool
--allow-unauthenticated
43 testfileexists
'cool_1.0_i386.deb'
46 mv aptarchive
/pool
/cool_1.0_i386.deb aptarchive
/pool
/cool_1.0_i386.deb.bak
47 echo 'this is not a good package' > aptarchive
/pool
/cool_1.0_i386.deb
48 testfailure aptget download cool
49 testfilemissing cool_1.0_i386.deb
51 testfailure aptget download cool
--allow-unauthenticated # unauthenticated doesn't mean unchecked
52 testfilemissing cool_1.0_i386.deb
54 rm -f aptarchive
/pool
/cool_1.0_i386.deb
55 mv aptarchive
/pool
/cool_1.0_i386.deb.bak aptarchive
/pool
/cool_1.0_i386.deb
56 testsuccess aptget download cool
--allow-unauthenticated
57 testfileexists
'cool_1.0_i386.deb'
62 find aptarchive
/ \
( -name 'Release.gpg' -o -name 'InRelease' \
) -delete