From: Nicolas Pitre Date: Thu, 4 Feb 2010 03:48:26 +0000 (-0500) Subject: fix multiple issues with t5300 X-Git-Tag: v1.7.0-rc2~18 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2fca19fbb524d028bff0467762186e641aa3351a;p=git.git fix multiple issues with t5300 First of all, trying to run 'git verify-pack' on packs produced by the tests using pack.packSizeLimit always failed. After lots of digging and head scratching, it turns out that the preceeding test simulating a SHA1 collision did leave the repository quite confused, impacting subsequent tests. So let's move that destructive test last, and add tests to run verify-pack on the output from those packSizeLimit tests to catch such goofage. Finally, group those packSizeLimit tests together. Signed-off-by: Nicolas Pitre Signed-off-by: Junio C Hamano --- diff --git a/t/t5300-pack-object.sh b/t/t5300-pack-object.sh index e2aa254ea..7c6231c66 100755 --- a/t/t5300-pack-object.sh +++ b/t/t5300-pack-object.sh @@ -280,26 +280,8 @@ test_expect_success \ :' -test_expect_success \ - 'fake a SHA1 hash collision' \ - 'test -f .git/objects/c8/2de19312b6c3695c0c18f70709a6c535682a67 && - cp -f .git/objects/9d/235ed07cd19811a6ceb342de82f190e49c9f68 \ - .git/objects/c8/2de19312b6c3695c0c18f70709a6c535682a67' - -test_expect_success \ - 'make sure index-pack detects the SHA1 collision' \ - 'test_must_fail git index-pack -o bad.idx test-3.pack 2>msg && - grep "SHA1 COLLISION FOUND" msg' - -test_expect_success \ - 'honor pack.packSizeLimit' \ - 'git config pack.packSizeLimit 200 && - packname_4=$(git pack-objects test-4 msg && + grep "SHA1 COLLISION FOUND" msg' + test_done