diff options
author | Julian Andres Klode <jak@debian.org> | 2016-09-02 22:38:34 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2016-09-02 22:38:34 +0200 |
commit | 969d33307ae0cc1b433a0462ef1561580ea6ddbc (patch) | |
tree | 0322cf6e3a82a1536c4516e8729993ce68af57af /test/integration | |
parent | f6c10fb46d1193b8181b5846538e2cf7c15ff216 (diff) | |
parent | 54dd6baaf16e92c83f63bdb3633df6e603ac19f3 (diff) |
Merge tag '1.3_rc4' into ubuntu/master
apt Debian release 1.3~rc4
Diffstat (limited to 'test/integration')
-rwxr-xr-x | test/integration/test-apt-sources-deb822 | 4 | ||||
-rwxr-xr-x | test/integration/test-method-gpgv | 77 | ||||
-rwxr-xr-x | test/integration/test-srcrecord | 35 |
3 files changed, 114 insertions, 2 deletions
diff --git a/test/integration/test-apt-sources-deb822 b/test/integration/test-apt-sources-deb822 index abb31b793..f19f263d0 100755 --- a/test/integration/test-apt-sources-deb822 +++ b/test/integration/test-apt-sources-deb822 @@ -98,10 +98,10 @@ echo "$BASE" > $SOURCES echo "" >> $SOURCES echo "$BASE" | sed s/stable/unstable/ >> $SOURCES testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 +'http://ftp.debian.org/debian/dists/unstable/InRelease' ftp.debian.org_debian_dists_unstable_InRelease 0 'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 'http://ftp.debian.org/debian/dists/stable/main/binary-all/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-all_Packages 0 'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 -'http://ftp.debian.org/debian/dists/unstable/InRelease' ftp.debian.org_debian_dists_unstable_InRelease 0 'http://ftp.debian.org/debian/dists/unstable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_unstable_main_binary-i386_Packages 0 'http://ftp.debian.org/debian/dists/unstable/main/binary-all/Packages.xz' ftp.debian.org_debian_dists_unstable_main_binary-all_Packages 0 'http://ftp.debian.org/debian/dists/unstable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_unstable_main_i18n_Translation-en 0 " aptget update --print-uris @@ -110,10 +110,10 @@ testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' msgcleantest 'Test deb822 with' 'two Suite entries' echo "$BASE" | sed -e "s/stable/stable unstable/" > $SOURCES testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0 +'http://ftp.debian.org/debian/dists/unstable/InRelease' ftp.debian.org_debian_dists_unstable_InRelease 0 'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0 'http://ftp.debian.org/debian/dists/stable/main/binary-all/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-all_Packages 0 'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 -'http://ftp.debian.org/debian/dists/unstable/InRelease' ftp.debian.org_debian_dists_unstable_InRelease 0 'http://ftp.debian.org/debian/dists/unstable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_unstable_main_binary-i386_Packages 0 'http://ftp.debian.org/debian/dists/unstable/main/binary-all/Packages.xz' ftp.debian.org_debian_dists_unstable_main_binary-all_Packages 0 'http://ftp.debian.org/debian/dists/unstable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_unstable_main_i18n_Translation-en 0 " aptget update --print-uris diff --git a/test/integration/test-method-gpgv b/test/integration/test-method-gpgv new file mode 100755 index 000000000..86559b7cb --- /dev/null +++ b/test/integration/test-method-gpgv @@ -0,0 +1,77 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" + +setupenvironment +configarchitecture 'i386' + +cat > faked-apt-key <<EOF +#!/bin/sh +set -e +echo "FFOO" +find_gpgv_status_fd() { + while [ -n "\$1" ]; do + if [ "\$1" = '--status-fd' ]; then + shift + echo "\$1" + break + fi + shift + done +} +GPGSTATUSFD="\$(find_gpgv_status_fd "\$@")" +cat >&\${GPGSTATUSFD} gpgv.output +cat gpgv.output +EOF +chmod +x faked-apt-key + +testgpgv() { + echo "$3" > gpgv.output + msgtest "$1" "$2" + gpgvmethod >method.output 2>&1 || true + testsuccess --nomsg grep "$2" method.output +} + +testrun() { + testgpgv 'Good signed with long keyid' 'Good: GOODSIG 5A90D141DBAC8DAE,' '[GNUPG:] GOODSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org> +[GNUPG:] VALIDSIG 34A8E9D18DB320F367E8EAA05A90D141DBAC8DAE 2016-09-01 1472742625 0 4 0 1 11 00 34A8E9D18DB320F367E8EAA05A90D141DBAC8DAE' + testgpgv 'Good signed with fingerprint' 'Good: GOODSIG 34A8E9D18DB320F367E8EAA05A90D141DBAC8DAE,' '[GNUPG:] GOODSIG 34A8E9D18DB320F367E8EAA05A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org> +[GNUPG:] VALIDSIG 34A8E9D18DB320F367E8EAA05A90D141DBAC8DAE 2016-09-01 1472742625 0 4 0 1 11 00 34A8E9D18DB320F367E8EAA05A90D141DBAC8DAE' + + testgpgv 'No Pubkey with long keyid' 'NoPubKey: NO_PUBKEY E8525D47528144E2,' '[GNUPG:] ERRSIG E8525D47528144E2 1 11 00 1472744666 9 +[GNUPG:] NO_PUBKEY E8525D47528144E2' + testgpgv 'No Pubkey with fingerprint' 'NoPubKey: NO_PUBKEY DE66AECA9151AFA1877EC31DE8525D47528144E2,' '[GNUPG:] ERRSIG DE66AECA9151AFA1877EC31DE8525D47528144E2 1 11 00 1472744666 9 +[GNUPG:] NO_PUBKEY DE66AECA9151AFA1877EC31DE8525D47528144E2' + + testgpgv 'Expired key with long keyid' 'Worthless: EXPKEYSIG 4BC0A39C27CE74F9 Rex Expired <rex@example.org>,' '[GNUPG:] EXPKEYSIG 4BC0A39C27CE74F9 Rex Expired <rex@example.org> +[GNUPG:] VALIDSIG 891CC50E605796A0C6E733F74BC0A39C27CE74F9 2016-09-01 1472742629 0 4 0 1 11 00 891CC50E605796A0C6E733F74BC0A39C27CE74F9' + testgpgv 'Expired key with fingerprint' 'Worthless: EXPKEYSIG 891CC50E605796A0C6E733F74BC0A39C27CE74F9 Rex Expired <rex@example.org>,' '[GNUPG:] EXPKEYSIG 891CC50E605796A0C6E733F74BC0A39C27CE74F9 Rex Expired <rex@example.org> +[GNUPG:] VALIDSIG 891CC50E605796A0C6E733F74BC0A39C27CE74F9 2016-09-01 1472742629 0 4 0 1 11 00 891CC50E605796A0C6E733F74BC0A39C27CE74F9' +} + +gpgvmethod() { + echo '601 Configuration +Config-Item: Debug::Acquire::gpgv=1 +Config-Item: Dir::Bin::apt-key=./faked-apt-key + +600 URI Acquire +URI: file:///dev/null +Filename: /dev/zero +' | runapt "${METHODSDIR}/gpgv" +} +testrun + +gpgvmethod() { + echo '601 Configuration +Config-Item: Debug::Acquire::gpgv=1 +Config-Item: Dir::Bin::apt-key=./faked-apt-key + +600 URI Acquire +URI: file:///dev/null +Filename: /dev/zero +Signed-By: 34A8E9D18DB320F367E8EAA05A90D141DBAC8DAE +' | runapt "${METHODSDIR}/gpgv" +} +testrun diff --git a/test/integration/test-srcrecord b/test/integration/test-srcrecord new file mode 100755 index 000000000..34de2be72 --- /dev/null +++ b/test/integration/test-srcrecord @@ -0,0 +1,35 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" + +setupenvironment +configarchitecture 'native' + +cat > aptarchive/Sources <<EOF +Package: space-before-comma +Binary: space-before-comma1 , space-before-comma2 +Version: 1.0 +Maintainer: Joe Sixpack <joe@example.org> +Architecture: all + +Package: broken-field +Binary:, broken-field2 +Version: 1.0 +Maintainer: Joe Sixpack <joe@example.org> +Architecture: all + +Package: broken-field-b +Binary: , broken-field-b2 +Version: 1.0 +Maintainer: Joe Sixpack <joe@example.org> +Architecture: all +EOF + +setupaptarchive --no-update + +testsuccess aptget update +testsuccess aptcache showsrc space-before-comma1 +testsuccess aptcache showsrc broken-field2 +testsuccess aptcache showsrc broken-field-b2 |