Modernize t5530-upload-pack-error.
Some tests did not use test_must_fail. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
be2fb164ec
commit
1d8cd418b4
@ -32,9 +32,9 @@ test_expect_success 'fsck fails' '
|
|||||||
|
|
||||||
test_expect_success 'upload-pack fails due to error in pack-objects packing' '
|
test_expect_success 'upload-pack fails due to error in pack-objects packing' '
|
||||||
|
|
||||||
! echo "0032want $(git rev-parse HEAD)
|
printf "0032want %s\n00000009done\n0000" \
|
||||||
00000009done
|
$(git rev-parse HEAD) >input &&
|
||||||
0000" | git upload-pack . > /dev/null 2> output.err &&
|
test_must_fail git upload-pack . <input >/dev/null 2>output.err &&
|
||||||
grep "unable to read" output.err &&
|
grep "unable to read" output.err &&
|
||||||
grep "pack-objects died" output.err
|
grep "pack-objects died" output.err
|
||||||
'
|
'
|
||||||
@ -51,9 +51,9 @@ test_expect_success 'fsck fails' '
|
|||||||
'
|
'
|
||||||
test_expect_success 'upload-pack fails due to error in rev-list' '
|
test_expect_success 'upload-pack fails due to error in rev-list' '
|
||||||
|
|
||||||
! echo "0032want $(git rev-parse HEAD)
|
printf "0032want %s\n0034shallow %s00000009done\n0000" \
|
||||||
0034shallow $(git rev-parse HEAD^)00000009done
|
$(git rev-parse HEAD) $(git rev-parse HEAD^) >input &&
|
||||||
0000" | git upload-pack . > /dev/null 2> output.err &&
|
test_must_fail git upload-pack . <input >/dev/null 2>output.err &&
|
||||||
# pack-objects survived
|
# pack-objects survived
|
||||||
grep "Total.*, reused" output.err &&
|
grep "Total.*, reused" output.err &&
|
||||||
# but there was an error, which must have been in rev-list
|
# but there was an error, which must have been in rev-list
|
||||||
@ -62,9 +62,9 @@ test_expect_success 'upload-pack fails due to error in rev-list' '
|
|||||||
|
|
||||||
test_expect_success 'upload-pack fails due to error in pack-objects enumeration' '
|
test_expect_success 'upload-pack fails due to error in pack-objects enumeration' '
|
||||||
|
|
||||||
! echo "0032want $(git rev-parse HEAD)
|
printf "0032want %s\n00000009done\n0000" \
|
||||||
00000009done
|
$(git rev-parse HEAD) >input &&
|
||||||
0000" | git upload-pack . > /dev/null 2> output.err &&
|
test_must_fail git upload-pack . <input >/dev/null 2>output.err &&
|
||||||
grep "bad tree object" output.err &&
|
grep "bad tree object" output.err &&
|
||||||
grep "pack-objects died" output.err
|
grep "pack-objects died" output.err
|
||||||
'
|
'
|
||||||
|
Loading…
Reference in New Issue
Block a user