From 636c7dc17286d93d788c741d15fd756aeda066d5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 5 May 2024 20:07:13 +0200 Subject: Adding upstream version 1.8.2.3. Signed-off-by: Daniel Baumann --- test/integration/test-hashsum-verification | 82 ++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100755 test/integration/test-hashsum-verification (limited to 'test/integration/test-hashsum-verification') diff --git a/test/integration/test-hashsum-verification b/test/integration/test-hashsum-verification new file mode 100755 index 0000000..a514b85 --- /dev/null +++ b/test/integration/test-hashsum-verification @@ -0,0 +1,82 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" + +setupenvironment +configarchitecture "i386" + +buildaptarchive +setupflataptarchive +changetowebserver + +prepare() { + local DATE="${2:-now}" + if [ "$DATE" = 'now' -a "$1" = "${PKGFILE}-new" ]; then + DATE='now + 6 days' + fi + for release in $(find rootdir/var/lib/apt/lists 2> /dev/null); do + touch -d 'now - 6 hours' "$release" + done + cp "$1" aptarchive/Packages + find aptarchive -name 'Release' -delete + compressfile aptarchive/Packages + # create Release file with incorret checksums + cat > aptarchive/Release < rootdir/etc/apt/apt.conf.d/compressindexes + if $COMPRESSEDINDEXES; then + msgmsg 'Run tests with GzipIndexes enabled' + else + msgmsg 'Run tests with GzipIndexes disabled' + fi + runtest +done -- cgit v1.2.3