summaryrefslogtreecommitdiff
path: root/test/integration/test-pdiff-usage
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2017-07-26 18:35:42 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2017-07-26 19:07:56 +0200
commitf2f8e89f08cdf01c83a0b8ab053c65329d85ca90 (patch)
tree7ca9caf3e9dfa5caaad5dda836c0d95278a57204 /test/integration/test-pdiff-usage
parentd7518dba50e2285c41c7002a1d86f876401fd9ea (diff)
fail early in http if server answer is too small as well
Failing on too much data is good, but we can do better by checking for exact filesizes as we know with hashsums how large a file should be, so if we get a file which has a size we do not expect we can drop it directly, regardless of if the file is larger or smaller than what we expect which should catch most cases which would end up as hashsum errors later now a lot sooner.
Diffstat (limited to 'test/integration/test-pdiff-usage')
-rwxr-xr-xtest/integration/test-pdiff-usage4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage
index 6a6f13b1b..53586ef32 100755
--- a/test/integration/test-pdiff-usage
+++ b/test/integration/test-pdiff-usage
@@ -298,9 +298,7 @@ SHA256-Patches:
SHA256-Download:
d2a1b33187ed2d248eeae3b1223ea71791ea35f2138a713ed371332a6421f467 197 2010-08-18-2013.28.gz
$(sha256sum "${PATCHFILE}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE}.gz") $(basename "${PATCHFILE}.gz")" > "$PATCHINDEX"
- # needs to look like a valid command, otherwise the parser will fail before hashes are checked
- echo '1d' > "$PATCHFILE"
- cat "$PATCHFILE" | gzip > "${PATCHFILE}.gz"
+ breakfiles "$PATCHFILE" "${PATCHFILE}.gz"
generatereleasefiles '+1hour'
signreleasefiles
testsuccess apt update "$@"