1 test_expect_success "setup proc-receive hook (ok, $PROTOCOL)" '
2 write_script "$upstream/hooks/proc-receive" <<-EOF
3 printf >&2 "# proc-receive hook\n"
4 test-tool proc-receive -v \
5 -r "ok refs/for/master/topic"
9 # Refs of upstream : master(A)
10 # Refs of workbench: master(A) tags/v123
11 # git push : refs/for/master/topic
12 test_expect_success "proc-receive: ok ($PROTOCOL)" '
13 git -C workbench push origin \
14 HEAD:refs/for/master/topic \
16 make_user_friendly_and_stable_output <out >actual &&
18 remote: # pre-receive hook
19 remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
20 remote: # proc-receive hook
21 remote: proc-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
22 remote: proc-receive> ok refs/for/master/topic
23 remote: # post-receive hook
24 remote: post-receive< <ZERO-OID> <COMMIT-A> refs/for/master/topic
25 To <URL/of/upstream.git>
26 * [new reference] HEAD -> refs/for/master/topic
28 test_cmp expect actual &&
29 git -C "$upstream" show-ref >out &&
30 make_user_friendly_and_stable_output <out >actual &&
32 <COMMIT-A> refs/heads/master
34 test_cmp expect actual