From 71203dbf00cbb259fb59e8daf0543a45394b6623 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 12 May 2016 10:04:19 +0200 Subject: Normalize Signed-By values by removing trailing commas everywhere This fixes comparisons where either the stored or the input string have a trailing comma. --- .../test-releasefile-verification-noflat | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 test/integration/test-releasefile-verification-noflat (limited to 'test') diff --git a/test/integration/test-releasefile-verification-noflat b/test/integration/test-releasefile-verification-noflat new file mode 100755 index 000000000..3953c6492 --- /dev/null +++ b/test/integration/test-releasefile-verification-noflat @@ -0,0 +1,25 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" + +setupenvironment +configarchitecture "i386" + +export APT_DONT_SIGN='Release.gpg' +insertpackage 'unstable' 'foo' 'i386' '1.0' +setupaptarchive "now" "now + 1 year" +changetowebserver + +SIXPACK="$(aptkey --keyring keys/joesixpack.pub finger | grep 'Key fingerprint' | cut -d'=' -f 2 | tr -d ' ')" + +testsuccess aptget update + +msgmsg 'Warm archive with signed-by' 'Joe Sixpack' +sed -i "/^Valid-Until: / a\ +Signed-By: ${SIXPACK}" rootdir/var/lib/apt/lists/*Release +touch -d 'now - 1 year' rootdir/var/lib/apt/lists/*Release +testsuccessequal "Get:1 http://localhost:${APTHTTPPORT} unstable InRelease [$(stat -c '%s' 'aptarchive/dists/unstable/InRelease') B] +Reading package lists..." aptget update +testsuccess aptcache show foo -- cgit v1.2.3