]> git.ipfire.org Git - thirdparty/git.git/blame - t/t5406-remote-rejects.sh
test-lib-functions: add and use a "test_hook" wrapper
[thirdparty/git.git] / t / t5406-remote-rejects.sh
CommitLineData
ca74c458
JK
1#!/bin/sh
2
3test_description='remote push rejects are reported by client'
4
5. ./test-lib.sh
6
7test_expect_success 'setup' '
7da7f63c 8 test_hook update <<-\EOF &&
fb23bd7a
ES
9 exit 1
10 EOF
ca74c458
JK
11 echo 1 >file &&
12 git add file &&
13 git commit -m 1 &&
14 git clone . child &&
15 cd child &&
16 echo 2 >file &&
17 git commit -a -m 2
18'
19
d492b31c 20test_expect_success 'push reports error' 'test_must_fail git push 2>stderr'
ca74c458
JK
21
22test_expect_success 'individual ref reports error' 'grep rejected stderr'
23
24test_done