fsck tests: add a test for no skipList input
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 3 Sep 2018 14:49:20 +0000 (14:49 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Sep 2018 22:17:46 +0000 (15:17 -0700)
The recent 65a836fa6b ("fsck: add stress tests for fsck.skipList",
2018-07-27) added various stress tests for odd invocations of
fsck.skipList, but didn't tests for some very simple ones, such as
asserting that providing to skipList with a bad commit causes fsck to
exit with a non-zero exit code. Add such a test.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5504-fetch-receive-strict.sh
index 6d268f3327d5d5aae4fe1efb89fa46ffa38bdd30..cbae31f3301b25e439b59b8925dcc21b9c5db1e4 100755 (executable)
@@ -137,6 +137,11 @@ test_expect_success 'setup bogus commit' '
        commit="$(git hash-object -t commit -w --stdin <bogus-commit)"
 '
 
+test_expect_success 'fsck with no skipList input' '
+       test_must_fail git fsck 2>err &&
+       test_i18ngrep "missingEmail" err
+'
+
 test_expect_success 'fsck with invalid or bogus skipList input' '
        git -c fsck.skipList=/dev/null -c fsck.missingEmail=ignore fsck &&
        test_must_fail git -c fsck.skipList=does-not-exist -c fsck.missingEmail=ignore fsck 2>err &&