mirror of
https://github.com/git/git.git
synced 2024-11-27 12:03:55 +08:00
t1401: remove lockfile creation
To create error conditions, some tests set up reference locks by directly creating its lockfile. While this works for the files reference backend, this approach is incompatible with the reftable backend. Refactor the test to create a d/f conflict via git-symbolic-ref(1) instead so that the test is reference backend agnostic. Signed-off-by: Justin Tobler <jltobler@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
a54a84b333
commit
a26f1fb62b
@ -106,9 +106,8 @@ test_expect_success LONG_REF 'we can parse long symbolic ref' '
|
||||
'
|
||||
|
||||
test_expect_success 'symbolic-ref reports failure in exit code' '
|
||||
test_when_finished "rm -f .git/HEAD.lock" &&
|
||||
>.git/HEAD.lock &&
|
||||
test_must_fail git symbolic-ref HEAD refs/heads/whatever
|
||||
# Create d/f conflict to simulate failure.
|
||||
test_must_fail git symbolic-ref refs/heads refs/heads/foo
|
||||
'
|
||||
|
||||
test_expect_success 'symbolic-ref writes reflog entry' '
|
||||
|
Loading…
Reference in New Issue
Block a user