}
installaptold() {
- testequal 'Reading package lists...
+ testsuccessequal 'Reading package lists...
Building dependency tree...
Suggested packages:
aptitude synaptic wajig dpkg-dev apt-doc bzip2 lzma python-apt
}
installaptnew() {
- testequal 'Reading package lists...
+ testsuccessequal 'Reading package lists...
Building dependency tree...
Suggested packages:
aptitude synaptic wajig dpkg-dev apt-doc bzip2 lzma python-apt
}
failaptold() {
- testequal 'Reading package lists...
+ testfailureequal 'Reading package lists...
Building dependency tree...
Suggested packages:
aptitude synaptic wajig dpkg-dev apt-doc bzip2 lzma python-apt
}
failaptnew() {
- testequal 'Reading package lists...
+ testfailureequal 'Reading package lists...
Building dependency tree...
Suggested packages:
aptitude synaptic wajig dpkg-dev apt-doc bzip2 lzma python-apt
find aptarchive/ -name "$DELETEFILE" -delete
msgtest 'Cold archive signed by' 'Joe Sixpack'
updatesuccess
- testequal "$(cat ${PKGFILE})
+ testsuccessequal "$(cat ${PKGFILE})
" aptcache show apt
installaptold
find aptarchive/ -name "$DELETEFILE" -delete
msgtest 'Good warm archive signed by' 'Joe Sixpack'
updatesuccess
- testequal "$(cat ${PKGFILE}-new)
+ testsuccessequal "$(cat ${PKGFILE}-new)
" aptcache show apt
installaptnew
find aptarchive/ -name "$DELETEFILE" -delete
msgtest 'Cold archive signed by' 'Rex Expired'
updatefailure '^W: .* KEYEXPIRED'
- testequal "$(cat ${PKGFILE})
+ testsuccessequal "$(cat ${PKGFILE})
" aptcache show apt
failaptold
rm rootdir/etc/apt/trusted.gpg.d/rexexpired.gpg
find aptarchive/ -name "$DELETEFILE" -delete
msgtest 'Cold archive signed by' 'Marvin Paranoid'
updatefailure '^W: .* NO_PUBKEY'
- testequal "$(cat ${PKGFILE})
+ testsuccessequal "$(cat ${PKGFILE})
" aptcache show apt
failaptold
find aptarchive/ -name "$DELETEFILE" -delete
msgtest 'Bad warm archive signed by' 'Joe Sixpack'
updatesuccess
- testequal "$(cat ${PKGFILE}-new)
+ testsuccessequal "$(cat ${PKGFILE}-new)
" aptcache show apt
installaptnew
find aptarchive/ -name "$DELETEFILE" -delete
msgtest 'Cold archive signed by' 'Joe Sixpack'
updatesuccess
- testequal "$(cat ${PKGFILE})
+ testsuccessequal "$(cat ${PKGFILE})
" aptcache show apt
installaptold
find aptarchive/ -name "$DELETEFILE" -delete
msgtest 'Good warm archive signed by' 'Marvin Paranoid'
updatefailure '^W: .* NO_PUBKEY'
- testequal "$(cat ${PKGFILE})
+ testsuccessequal "$(cat ${PKGFILE})
" aptcache show apt
installaptold
find aptarchive/ -name "$DELETEFILE" -delete
msgtest 'Good warm archive signed by' 'Rex Expired'
updatefailure '^W: .* KEYEXPIRED'
- testequal "$(cat ${PKGFILE})
+ testsuccessequal "$(cat ${PKGFILE})
" aptcache show apt
installaptold
rm rootdir/etc/apt/trusted.gpg.d/rexexpired.gpg
find aptarchive/ -name "$DELETEFILE" -delete
msgtest 'Good warm archive signed by' 'Joe Sixpack'
updatesuccess
- testequal "$(cat ${PKGFILE}-new)
+ testsuccessequal "$(cat ${PKGFILE}-new)
" aptcache show apt
installaptnew
}
find aptarchive/ -name Release.gpg -delete
msgtest 'Warm archive signed by' 'nobody'
updatesuccess
- testequal "$(cat ${PKGFILE}-new)
+ testsuccessequal "$(cat ${PKGFILE}-new)
" aptcache show apt
failaptnew
rm -rf rootdir/var/lib/apt/lists
msgtest 'Cold archive signed by' 'nobody'
updatesuccess
- testequal "$(cat ${PKGFILE}-new)
+ testsuccessequal "$(cat ${PKGFILE}-new)
" aptcache show apt
failaptnew
}
-runtest2
+# diable some protection by default and ensure we still do the verification
+# correctly
+cat > rootdir/etc/apt/apt.conf.d/weaken-security <<EOF
+Acquire::AllowInsecureRepositories "1";
+Acquire::AllowDowngradeToInsecureRepositories "1";
+EOF
+
+msgmsg "Runing base test"
+runtest2
DELETEFILE="InRelease"
+msgmsg "Running test with deletion of $DELETEFILE"
runtest
+
DELETEFILE="Release.gpg"
+msgmsg "Running test with deletion of $DELETEFILE"
runtest