summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-apt-key4
-rwxr-xr-xtest/integration/test-releasefile-verification18
2 files changed, 16 insertions, 6 deletions
diff --git a/test/integration/test-apt-key b/test/integration/test-apt-key
index a1e633ca3..c2180c5f1 100755
--- a/test/integration/test-apt-key
+++ b/test/integration/test-apt-key
@@ -258,7 +258,7 @@ gpg: unchanged: 1' aptkey --fakeroot update
msgtest 'Test verify a file' 'with no sig'
testfailure --nomsg aptkey --quiet --readonly --keyring "${KEYDIR}/testcase-multikey.pub.${EXT}" verify "${SIGNATURE}" "${SIGNATURE}2"
- for GPGV in '' 'gpgv' 'gpgv1' 'gpgv2'; do
+ for GPGV in '' 'gpgv' 'gpgv1' 'gpgv2' 'gpgv-sq' 'gpgv-g10code'; do
echo "APT::Key::GPGVCommand \"$GPGV\";" > "${ROOTDIR}/etc/apt/apt.conf.d/00gpgvcmd"
if [ -n "$GPGV" ] && ! command dpkg -l gnupg1 2>&1 | grep -q '^ii'; then continue; fi
@@ -330,7 +330,7 @@ gpg: unchanged: 1' aptkey --fakeroot update
adv --batch --yes -u 'Marvin' -u 'Joe' --armor --detach-sign --sign --output "${SIGNATURE}.gpg" "${SIGNATURE}"
testsuccess test -s "${SIGNATURE}.gpg" -a -s "${SIGNATURE}"
- for GPGV in '' 'gpgv' 'gpgv1' 'gpgv2'; do
+ for GPGV in '' 'gpgv' 'gpgv1' 'gpgv2' 'gpgv-sq' 'gpgv-g10code'; do
echo "APT::Key::GPGVCommand \"$GPGV\";" > "${ROOTDIR}/etc/apt/apt.conf.d/00gpgvcmd"
if [ -n "$GPGV" ] && ! command dpkg -l gnupg1 2>&1 | grep -q '^ii'; then continue; fi
diff --git a/test/integration/test-releasefile-verification b/test/integration/test-releasefile-verification
index fcd5d987c..0109f2954 100755
--- a/test/integration/test-releasefile-verification
+++ b/test/integration/test-releasefile-verification
@@ -101,6 +101,16 @@ updatewithwarnings() {
testsuccess grep -E "$1" rootdir/tmp/testwarning.output
}
+foreachgpg() {
+ rm -f rootdir/etc/apt/apt.conf.d/00gpgvcmd
+ "$@"
+ for GPGV in "gpgv-sq" "gpgv-g10code"; do
+ msgmsg "Forcing $GPGV to be used"
+ echo "APT::Key::GPGVCommand \"$GPGV\";" > "rootdir/etc/apt/apt.conf.d/00gpgvcmd"
+ "$@"
+ done
+}
+
runtest() {
msgmsg 'Cold archive signed by' 'Joe Sixpack'
prepare "${PKGFILE}"
@@ -480,7 +490,7 @@ successfulaptgetupdate() {
testsuccess grep "$1" aptupdate.output
fi
}
-runtest3 'Trusted'
+foreachgpg runtest3 'Trusted'
successfulaptgetupdate() {
testwarning aptget update -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::gpgv=1
@@ -489,7 +499,7 @@ successfulaptgetupdate() {
fi
testsuccess grep 'uses weak algorithm' rootdir/tmp/testwarning.output
}
-runtest3 'Weak'
+foreachgpg runtest3 'Weak'
msgmsg "Running test with apt-untrusted digest"
echo "APT::Hashes::$APT_TESTS_DIGEST_ALGO::Untrusted \"yes\";" > rootdir/etc/apt/apt.conf.d/truststate
@@ -524,8 +534,8 @@ runfailure() {
export APT_DONT_SIGN='Release.gpg'
done
}
-runfailure
+foreachgpg runfailure
msgmsg "Running test with gpgv-untrusted digest"
export APT_TESTS_DIGEST_ALGO='MD5'
-runfailure
+foreachgpg runfailure