diff options
Diffstat (limited to 't/t5530-upload-pack-error.sh')
-rwxr-xr-x | t/t5530-upload-pack-error.sh | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/t/t5530-upload-pack-error.sh b/t/t5530-upload-pack-error.sh index 1a15817cd5..a696b8791b 100755 --- a/t/t5530-upload-pack-error.sh +++ b/t/t5530-upload-pack-error.sh @@ -30,11 +30,12 @@ test_expect_success 'fsck fails' ' test_must_fail git fsck ' -test_expect_success 'upload-pack fails due to error in pack-objects' ' +test_expect_success 'upload-pack fails due to error in pack-objects packing' ' ! echo "0032want $(git rev-parse HEAD) 00000009done -0000" | git-upload-pack . > /dev/null 2> output.err && +0000" | git upload-pack . > /dev/null 2> output.err && + grep "unable to read" output.err && grep "pack-objects died" output.err ' @@ -51,9 +52,21 @@ test_expect_success 'fsck fails' ' test_expect_success 'upload-pack fails due to error in rev-list' ' ! echo "0032want $(git rev-parse HEAD) +0034shallow $(git rev-parse HEAD^)00000009done +0000" | git upload-pack . > /dev/null 2> output.err && + # pack-objects survived + grep "Total.*, reused" output.err && + # but there was an error, which must have been in rev-list + grep "bad tree object" output.err +' + +test_expect_success 'upload-pack fails due to error in pack-objects enumeration' ' + + ! echo "0032want $(git rev-parse HEAD) 00000009done -0000" | git-upload-pack . > /dev/null 2> output.err && - grep "waitpid (async) failed" output.err +0000" | git upload-pack . > /dev/null 2> output.err && + grep "bad tree object" output.err && + grep "pack-objects died" output.err ' test_expect_success 'create empty repository' ' |