11
test_expect_success "proc-receive: bad protocol (unknown version, $PROTOCOL/porcelain)" '
12
test_must_fail git -C workbench push --porcelain origin \
13
HEAD:refs/for/main/topic \
14
- >out 2>&1 &&
15
- make_user_friendly_and_stable_output <out >actual &&
14
+ >out-$test_count 2>&1 &&
15
+ make_user_friendly_and_stable_output <out-$test_count >actual &&
16
17
# Check status report for git-push
18
sed -n \
55
test_expect_success "proc-receive: bad protocol (hook --die-read-version, $PROTOCOL/porcelain)" '
56
test_must_fail git -C workbench push --porcelain origin \
57
HEAD:refs/for/main/topic \
58
- >out 2>&1 &&
58
+ >out-$test_count 2>&1 &&
59
filter_out_user_friendly_and_stable_output \
60
-e "/^To / { p; n; p; n; p; }" \
61
- <out >actual &&
61
+ <out-$test_count >actual &&
62
cat >expect <<-EOF &&
63
To <URL/of/upstream.git>
64
! HEAD:refs/for/main/topic [remote rejected] (fail to run proc-receive hook)
65
Done
66
EOF
67
test_cmp expect actual &&
68
- grep "remote: fatal: die with the --die-read-version option" out &&
69
- grep "remote: error: fail to negotiate version with proc-receive hook" out &&
68
+ grep "remote: fatal: die with the --die-read-version option" out-$test_count &&
69
+ grep "remote: error: fail to negotiate version with proc-receive hook" out-$test_count &&
70
71
git -C "$upstream" show-ref >out &&
72
make_user_friendly_and_stable_output <out >actual &&
89
test_expect_success "proc-receive: bad protocol (hook --die-write-version, $PROTOCOL/porcelain)" '
90
test_must_fail git -C workbench push --porcelain origin \
91
HEAD:refs/for/main/topic \
92
- >out 2>&1 &&
92
+ >out-$test_count 2>&1 &&
93
filter_out_user_friendly_and_stable_output \
94
-e "/^To / { p; n; p; n; p; }" \
95
- <out >actual &&
95
+ <out-$test_count >actual &&
96
cat >expect <<-EOF &&
97
To <URL/of/upstream.git>
98
! HEAD:refs/for/main/topic [remote rejected] (fail to run proc-receive hook)
99
Done
100
EOF
101
test_cmp expect actual &&
102
- grep "remote: fatal: die with the --die-write-version option" out &&
103
- grep "remote: error: fail to negotiate version with proc-receive hook" out &&
102
+ grep "remote: fatal: die with the --die-write-version option" out-$test_count &&
103
+ grep "remote: error: fail to negotiate version with proc-receive hook" out-$test_count &&
104
105
git -C "$upstream" show-ref >out &&
106
make_user_friendly_and_stable_output <out >actual &&
123
test_expect_success "proc-receive: bad protocol (hook --die-read-commands, $PROTOCOL/porcelain)" '
124
test_must_fail git -C workbench push --porcelain origin \
125
HEAD:refs/for/main/topic \
126
- >out 2>&1 &&
126
+ >out-$test_count 2>&1 &&
127
filter_out_user_friendly_and_stable_output \
128
-e "/^To / { p; n; p; n; p; }" \
129
- <out >actual &&
129
+ <out-$test_count >actual &&
130
cat >expect <<-EOF &&
131
To <URL/of/upstream.git>
132
! HEAD:refs/for/main/topic [remote rejected] (fail to run proc-receive hook)
133
Done
134
EOF
135
test_cmp expect actual &&
136
- grep "remote: fatal: die with the --die-read-commands option" out &&
136
+ grep "remote: fatal: die with the --die-read-commands option" out-$test_count &&
137
138
git -C "$upstream" show-ref >out &&
139
make_user_friendly_and_stable_output <out >actual &&
158
test_must_fail git -C workbench push --porcelain origin \
159
-o reviewers=user1,user2 \
160
HEAD:refs/for/main/topic \
161
- >out 2>&1 &&
161
+ >out-$test_count 2>&1 &&
162
filter_out_user_friendly_and_stable_output \
163
-e "/^To / { p; n; p; n; p; }" \
164
- <out >actual &&
164
+ <out-$test_count >actual &&
165
cat >expect <<-EOF &&
166
To <URL/of/upstream.git>
167
! HEAD:refs/for/main/topic [remote rejected] (fail to run proc-receive hook)
168
Done
169
EOF
170
test_cmp expect actual &&
171
- grep "remote: fatal: die with the --die-read-push-options option" out &&
171
+ grep "remote: fatal: die with the --die-read-push-options option" out-$test_count &&
172
173
git -C "$upstream" show-ref >out &&
174
make_user_friendly_and_stable_output <out >actual &&
191
test_expect_success "proc-receive: bad protocol (hook --die-write-report, $PROTOCOL/porcelain)" '
192
test_must_fail git -C workbench push --porcelain origin \
193
HEAD:refs/for/main/topic \
194
- >out 2>&1 &&
194
+ >out-$test_count 2>&1 &&
195
filter_out_user_friendly_and_stable_output \
196
-e "/^To / { p; n; p; n; p; }" \
197
- <out >actual &&
197
+ <out-$test_count >actual &&
198
cat >expect <<-EOF &&
199
To <URL/of/upstream.git>
200
! HEAD:refs/for/main/topic [remote rejected] (fail to run proc-receive hook)
201
Done
202
EOF
203
test_cmp expect actual &&
204
- grep "remote: fatal: die with the --die-write-report option" out &&
204
+ grep "remote: fatal: die with the --die-write-report option" out-$test_count &&
205
206
git -C "$upstream" show-ref >out &&
207
make_user_friendly_and_stable_output <out >actual &&
224
test_expect_success "proc-receive: bad protocol (no report, $PROTOCOL/porcelain)" '
225
test_must_fail git -C workbench push --porcelain origin \
226
HEAD:refs/heads/next \
227
- HEAD:refs/for/main/topic >out 2>&1 &&
228
- make_user_friendly_and_stable_output <out >actual &&
227
+ HEAD:refs/for/main/topic >out-$test_count 2>&1 &&
228
+ make_user_friendly_and_stable_output <out-$test_count >actual &&
229
cat >expect <<-EOF &&
230
remote: # pre-receive hook
231
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/heads/next
270
test_expect_success "proc-receive: bad protocol (no ref, $PROTOCOL/porcelain)" '
271
test_must_fail git -C workbench push --porcelain origin \
272
HEAD:refs/for/main/topic\
273
- >out 2>&1 &&
274
- make_user_friendly_and_stable_output <out >actual &&
273
+ >out-$test_count 2>&1 &&
274
+ make_user_friendly_and_stable_output <out-$test_count >actual &&
275
cat >expect <<-EOF &&
276
remote: # pre-receive hook
277
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic
307
test_expect_success "proc-receive: bad protocol (unknown status, $PROTOCOL/porcelain)" '
308
test_must_fail git -C workbench push --porcelain origin \
309
HEAD:refs/for/main/topic \
310
- >out 2>&1 &&
311
- make_user_friendly_and_stable_output <out >actual &&
310
+ >out-$test_count 2>&1 &&
311
+ make_user_friendly_and_stable_output <out-$test_count >actual &&
312
cat >expect <<-EOF &&
313
remote: # pre-receive hook
314
remote: pre-receive< <ZERO-OID> <COMMIT-A> refs/for/main/topic