From 851b6a097165af4d51c0db01b5e05256e5006896 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:00:48 +0200 Subject: Adding upstream version 2.6.1. 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..4060dfb --- /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 incorrect 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