Blame


1 6d7eb4f7 2023-04-04 thomas #!/bin/sh
2 6d7eb4f7 2023-04-04 thomas #
3 6d7eb4f7 2023-04-04 thomas # Copyright (c) 2023 Stefan Sperling <stsp@openbsd.org>
4 6d7eb4f7 2023-04-04 thomas #
5 6d7eb4f7 2023-04-04 thomas # Permission to use, copy, modify, and distribute this software for any
6 6d7eb4f7 2023-04-04 thomas # purpose with or without fee is hereby granted, provided that the above
7 6d7eb4f7 2023-04-04 thomas # copyright notice and this permission notice appear in all copies.
8 6d7eb4f7 2023-04-04 thomas #
9 6d7eb4f7 2023-04-04 thomas # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 6d7eb4f7 2023-04-04 thomas # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 6d7eb4f7 2023-04-04 thomas # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 6d7eb4f7 2023-04-04 thomas # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 6d7eb4f7 2023-04-04 thomas # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 6d7eb4f7 2023-04-04 thomas # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 6d7eb4f7 2023-04-04 thomas # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 6d7eb4f7 2023-04-04 thomas
17 6d7eb4f7 2023-04-04 thomas . ../cmdline/common.sh
18 6d7eb4f7 2023-04-04 thomas . ./common.sh
19 6d7eb4f7 2023-04-04 thomas
20 6d7eb4f7 2023-04-04 thomas test_create_protected_branch() {
21 6d7eb4f7 2023-04-04 thomas local testroot=`test_init create_protected_branch 1`
22 6d7eb4f7 2023-04-04 thomas
23 6d7eb4f7 2023-04-04 thomas got clone -a -q ${GOTD_TEST_REPO_URL} $testroot/repo-clone
24 6d7eb4f7 2023-04-04 thomas ret=$?
25 6d7eb4f7 2023-04-04 thomas if [ $ret -ne 0 ]; then
26 6d7eb4f7 2023-04-04 thomas echo "got clone failed unexpectedly" >&2
27 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
28 6d7eb4f7 2023-04-04 thomas return 1
29 6d7eb4f7 2023-04-04 thomas fi
30 6d7eb4f7 2023-04-04 thomas
31 6d7eb4f7 2023-04-04 thomas got checkout -q $testroot/repo-clone $testroot/wt >/dev/null
32 6d7eb4f7 2023-04-04 thomas ret=$?
33 6d7eb4f7 2023-04-04 thomas if [ $ret -ne 0 ]; then
34 6d7eb4f7 2023-04-04 thomas echo "got checkout failed unexpectedly" >&2
35 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
36 6d7eb4f7 2023-04-04 thomas return 1
37 6d7eb4f7 2023-04-04 thomas fi
38 6d7eb4f7 2023-04-04 thomas
39 6d7eb4f7 2023-04-04 thomas (cd $testroot/wt && got branch foo) >/dev/null
40 6d7eb4f7 2023-04-04 thomas ret=$?
41 6d7eb4f7 2023-04-04 thomas if [ $ret -ne 0 ]; then
42 6d7eb4f7 2023-04-04 thomas echo "got branch failed unexpectedly" >&2
43 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
44 6d7eb4f7 2023-04-04 thomas return 1
45 6d7eb4f7 2023-04-04 thomas fi
46 6d7eb4f7 2023-04-04 thomas
47 6d7eb4f7 2023-04-04 thomas echo modified alpha > $testroot/wt/alpha
48 6d7eb4f7 2023-04-04 thomas (cd $testroot/wt && got commit -m 'edit alpha') >/dev/null
49 6d7eb4f7 2023-04-04 thomas ret=$?
50 6d7eb4f7 2023-04-04 thomas if [ $ret -ne 0 ]; then
51 6d7eb4f7 2023-04-04 thomas echo "got commit failed unexpectedly" >&2
52 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
53 6d7eb4f7 2023-04-04 thomas return 1
54 6d7eb4f7 2023-04-04 thomas fi
55 6d7eb4f7 2023-04-04 thomas local commit_id=`git_show_branch_head $testroot/repo-clone foo`
56 6d7eb4f7 2023-04-04 thomas
57 6d7eb4f7 2023-04-04 thomas # Creating a new branch should succeed.
58 6d7eb4f7 2023-04-04 thomas got send -q -r $testroot/repo-clone -b foo 2> $testroot/stderr
59 6d7eb4f7 2023-04-04 thomas ret=$?
60 6d7eb4f7 2023-04-04 thomas if [ $ret -ne 0 ]; then
61 6d7eb4f7 2023-04-04 thomas echo "got send failed unexpectedly" >&2
62 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
63 6d7eb4f7 2023-04-04 thomas return 1
64 6d7eb4f7 2023-04-04 thomas fi
65 6d7eb4f7 2023-04-04 thomas
66 6d7eb4f7 2023-04-04 thomas # Verify that the send operation worked fine.
67 6d7eb4f7 2023-04-04 thomas got clone -l ${GOTD_TEST_REPO_URL} | grep foo > $testroot/stdout
68 6d7eb4f7 2023-04-04 thomas ret=$?
69 6d7eb4f7 2023-04-04 thomas if [ $ret -ne 0 ]; then
70 6d7eb4f7 2023-04-04 thomas echo "got clone -l failed unexpectedly" >&2
71 6d7eb4f7 2023-04-04 thomas test_done "$testroot" "1"
72 6d7eb4f7 2023-04-04 thomas return 1
73 6d7eb4f7 2023-04-04 thomas fi
74 6d7eb4f7 2023-04-04 thomas
75 6d7eb4f7 2023-04-04 thomas echo "refs/heads/foo: $commit_id" > $testroot/stdout.expected
76 6d7eb4f7 2023-04-04 thomas cmp -s $testroot/stdout.expected $testroot/stdout
77 6d7eb4f7 2023-04-04 thomas ret=$?
78 6d7eb4f7 2023-04-04 thomas if [ $ret -ne 0 ]; then
79 6d7eb4f7 2023-04-04 thomas diff -u $testroot/stdout.expected $testroot/stdout
80 6d7eb4f7 2023-04-04 thomas fi
81 6d7eb4f7 2023-04-04 thomas
82 6d7eb4f7 2023-04-04 thomas test_done "$testroot" $ret
83 6d7eb4f7 2023-04-04 thomas }
84 6d7eb4f7 2023-04-04 thomas
85 6d7eb4f7 2023-04-04 thomas test_modify_protected_tag_namespace() {
86 6d7eb4f7 2023-04-04 thomas local testroot=`test_init modify_protected_tag_namespace`
87 6d7eb4f7 2023-04-04 thomas
88 6d7eb4f7 2023-04-04 thomas got clone -a -q ${GOTD_TEST_REPO_URL} $testroot/repo-clone
89 6d7eb4f7 2023-04-04 thomas ret=$?
90 6d7eb4f7 2023-04-04 thomas if [ $ret -ne 0 ]; then
91 6d7eb4f7 2023-04-04 thomas echo "got clone failed unexpectedly" >&2
92 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
93 6d7eb4f7 2023-04-04 thomas return 1
94 6d7eb4f7 2023-04-04 thomas fi
95 6d7eb4f7 2023-04-04 thomas
96 6d7eb4f7 2023-04-04 thomas got tag -r $testroot/repo-clone -m "1.0" 1.0 >/dev/null
97 6d7eb4f7 2023-04-04 thomas ret=$?
98 6d7eb4f7 2023-04-04 thomas if [ $ret -ne 0 ]; then
99 6d7eb4f7 2023-04-04 thomas echo "got tag failed unexpectedly" >&2
100 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
101 6d7eb4f7 2023-04-04 thomas return 1
102 6d7eb4f7 2023-04-04 thomas fi
103 6d7eb4f7 2023-04-04 thomas
104 6d7eb4f7 2023-04-04 thomas # Creating a new tag should succeed.
105 6d7eb4f7 2023-04-04 thomas got send -q -r $testroot/repo-clone -t 1.0 2> $testroot/stderr
106 6d7eb4f7 2023-04-04 thomas ret=$?
107 6d7eb4f7 2023-04-04 thomas if [ $ret -ne 0 ]; then
108 6d7eb4f7 2023-04-04 thomas echo "got send failed unexpectedly" >&2
109 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
110 6d7eb4f7 2023-04-04 thomas return 1
111 6d7eb4f7 2023-04-04 thomas fi
112 6d7eb4f7 2023-04-04 thomas
113 6d7eb4f7 2023-04-04 thomas got ref -r $testroot/repo-clone -d refs/tags/1.0 > /dev/null
114 6d7eb4f7 2023-04-04 thomas got tag -r $testroot/repo-clone -m "another 1.0" 1.0 >/dev/null
115 6d7eb4f7 2023-04-04 thomas ret=$?
116 6d7eb4f7 2023-04-04 thomas if [ $ret -ne 0 ]; then
117 6d7eb4f7 2023-04-04 thomas echo "got tag failed unexpectedly" >&2
118 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
119 6d7eb4f7 2023-04-04 thomas return 1
120 6d7eb4f7 2023-04-04 thomas fi
121 6d7eb4f7 2023-04-04 thomas
122 6d7eb4f7 2023-04-04 thomas # Overwriting an existing tag should fail.
123 6d7eb4f7 2023-04-04 thomas got send -q -f -r $testroot/repo-clone -t 1.0 2> $testroot/stderr
124 6d7eb4f7 2023-04-04 thomas ret=$?
125 6d7eb4f7 2023-04-04 thomas if [ $ret == 0 ]; then
126 6d7eb4f7 2023-04-04 thomas echo "got send succeeded unexpectedly" >&2
127 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
128 6d7eb4f7 2023-04-04 thomas return 1
129 6d7eb4f7 2023-04-04 thomas fi
130 6d7eb4f7 2023-04-04 thomas
131 6d7eb4f7 2023-04-04 thomas if ! egrep -q '(gotsh|got-send-pack): refs/tags/: reference namespace is protected' \
132 6d7eb4f7 2023-04-04 thomas $testroot/stderr; then
133 6d7eb4f7 2023-04-04 thomas echo -n "error message unexpected or missing: " >&2
134 6d7eb4f7 2023-04-04 thomas cat $testroot/stderr >&2
135 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
136 6d7eb4f7 2023-04-04 thomas return 1
137 6d7eb4f7 2023-04-04 thomas fi
138 6d7eb4f7 2023-04-04 thomas
139 6d7eb4f7 2023-04-04 thomas # Deleting an existing tag should fail.
140 6d7eb4f7 2023-04-04 thomas # 'got send' cannot even do this so we use 'git push'.
141 6d7eb4f7 2023-04-04 thomas (cd $testroot/repo-clone && git push -q -d origin refs/tags/1.0 \
142 6d7eb4f7 2023-04-04 thomas 2> $testroot/stderr)
143 6d7eb4f7 2023-04-04 thomas ret=$?
144 6d7eb4f7 2023-04-04 thomas if [ $ret -eq 0 ]; then
145 6d7eb4f7 2023-04-04 thomas echo "git push -d succeeded unexpectedly" >&2
146 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
147 6d7eb4f7 2023-04-04 thomas return 1
148 6d7eb4f7 2023-04-04 thomas fi
149 6d7eb4f7 2023-04-04 thomas
150 6d7eb4f7 2023-04-04 thomas if ! egrep -q '(fatal: remote error|gotsh): refs/tags/: reference namespace is protected' \
151 6d7eb4f7 2023-04-04 thomas $testroot/stderr; then
152 6d7eb4f7 2023-04-04 thomas echo -n "error message unexpected or missing: " >&2
153 6d7eb4f7 2023-04-04 thomas cat $testroot/stderr >&2
154 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
155 6d7eb4f7 2023-04-04 thomas return 1
156 6d7eb4f7 2023-04-04 thomas fi
157 6d7eb4f7 2023-04-04 thomas
158 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 0
159 6d7eb4f7 2023-04-04 thomas }
160 6d7eb4f7 2023-04-04 thomas
161 6d7eb4f7 2023-04-04 thomas test_delete_protected_branch() {
162 6d7eb4f7 2023-04-04 thomas local testroot=`test_init delete_protected_branch`
163 6d7eb4f7 2023-04-04 thomas
164 6d7eb4f7 2023-04-04 thomas got clone -a -q ${GOTD_TEST_REPO_URL} $testroot/repo-clone
165 6d7eb4f7 2023-04-04 thomas ret=$?
166 6d7eb4f7 2023-04-04 thomas if [ $ret -ne 0 ]; then
167 6d7eb4f7 2023-04-04 thomas echo "got clone failed unexpectedly" >&2
168 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
169 6d7eb4f7 2023-04-04 thomas return 1
170 6d7eb4f7 2023-04-04 thomas fi
171 6d7eb4f7 2023-04-04 thomas
172 6d7eb4f7 2023-04-04 thomas if got send -q -r $testroot/repo-clone -d main 2> $testroot/stderr; then
173 6d7eb4f7 2023-04-04 thomas echo "got send succeeded unexpectedly" >&2
174 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
175 6d7eb4f7 2023-04-04 thomas return 1
176 6d7eb4f7 2023-04-04 thomas fi
177 6d7eb4f7 2023-04-04 thomas
178 6d7eb4f7 2023-04-04 thomas if ! egrep -q '(gotsh|got-send-pack): refs/heads/main: reference is protected' \
179 6d7eb4f7 2023-04-04 thomas $testroot/stderr; then
180 6d7eb4f7 2023-04-04 thomas echo -n "error message unexpected or missing: " >&2
181 6d7eb4f7 2023-04-04 thomas cat $testroot/stderr >&2
182 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
183 6d7eb4f7 2023-04-04 thomas return 1
184 6d7eb4f7 2023-04-04 thomas fi
185 6d7eb4f7 2023-04-04 thomas
186 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 0
187 6d7eb4f7 2023-04-04 thomas }
188 6d7eb4f7 2023-04-04 thomas
189 6d7eb4f7 2023-04-04 thomas test_modify_protected_branch() {
190 6d7eb4f7 2023-04-04 thomas local testroot=`test_init modify_protected_branch`
191 6d7eb4f7 2023-04-04 thomas
192 6d7eb4f7 2023-04-04 thomas got clone -a -q ${GOTD_TEST_REPO_URL} $testroot/repo-clone
193 6d7eb4f7 2023-04-04 thomas ret=$?
194 6d7eb4f7 2023-04-04 thomas if [ $ret -ne 0 ]; then
195 6d7eb4f7 2023-04-04 thomas echo "got clone failed unexpectedly" >&2
196 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
197 6d7eb4f7 2023-04-04 thomas return 1
198 6d7eb4f7 2023-04-04 thomas fi
199 6d7eb4f7 2023-04-04 thomas
200 6d7eb4f7 2023-04-04 thomas got checkout $testroot/repo-clone $testroot/wt >/dev/null
201 6d7eb4f7 2023-04-04 thomas
202 6d7eb4f7 2023-04-04 thomas for i in 1 2 3; do
203 6d7eb4f7 2023-04-04 thomas echo "more alpha" >> $testroot/wt/alpha
204 6d7eb4f7 2023-04-04 thomas (cd $testroot/wt && got commit -m "more" >/dev/null)
205 6d7eb4f7 2023-04-04 thomas done
206 6d7eb4f7 2023-04-04 thomas local commit_id=`git_show_head $testroot/repo-clone`
207 6d7eb4f7 2023-04-04 thomas local parent_commit_id=`git_show_parent_commit $testroot/repo-clone \
208 6d7eb4f7 2023-04-04 thomas "$commit_id"`
209 6d7eb4f7 2023-04-04 thomas
210 6d7eb4f7 2023-04-04 thomas # Modifying the branch by adding new commits on top should succeed.
211 6d7eb4f7 2023-04-04 thomas got send -q -r $testroot/repo-clone 2> $testroot/stderr
212 6d7eb4f7 2023-04-04 thomas ret=$?
213 6d7eb4f7 2023-04-04 thomas if [ $ret -ne 0 ]; then
214 6d7eb4f7 2023-04-04 thomas echo "got send failed unexpectedly" >&2
215 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
216 6d7eb4f7 2023-04-04 thomas return 1
217 6d7eb4f7 2023-04-04 thomas fi
218 6d7eb4f7 2023-04-04 thomas
219 6d7eb4f7 2023-04-04 thomas # Verify that the send operation worked fine.
220 6d7eb4f7 2023-04-04 thomas got clone -l ${GOTD_TEST_REPO_URL} | grep main > $testroot/stdout
221 6d7eb4f7 2023-04-04 thomas ret=$?
222 6d7eb4f7 2023-04-04 thomas if [ $ret -ne 0 ]; then
223 6d7eb4f7 2023-04-04 thomas echo "got clone -l failed unexpectedly" >&2
224 6d7eb4f7 2023-04-04 thomas test_done "$testroot" "1"
225 6d7eb4f7 2023-04-04 thomas return 1
226 6d7eb4f7 2023-04-04 thomas fi
227 6d7eb4f7 2023-04-04 thomas
228 6d7eb4f7 2023-04-04 thomas echo "HEAD: refs/heads/main" > $testroot/stdout.expected
229 6d7eb4f7 2023-04-04 thomas echo "refs/heads/main: $commit_id" >> $testroot/stdout.expected
230 6d7eb4f7 2023-04-04 thomas cmp -s $testroot/stdout.expected $testroot/stdout
231 6d7eb4f7 2023-04-04 thomas ret=$?
232 6d7eb4f7 2023-04-04 thomas if [ $ret -ne 0 ]; then
233 6d7eb4f7 2023-04-04 thomas diff -u $testroot/stdout.expected $testroot/stdout
234 6d7eb4f7 2023-04-04 thomas test_done "$testroot" $ret
235 6d7eb4f7 2023-04-04 thomas return 1
236 6d7eb4f7 2023-04-04 thomas fi
237 6d7eb4f7 2023-04-04 thomas
238 6d7eb4f7 2023-04-04 thomas # Attempt to remove the tip commit
239 6d7eb4f7 2023-04-04 thomas (cd $testroot/wt && got update -c "$parent_commit_id" >/dev/null)
240 6d7eb4f7 2023-04-04 thomas (cd $testroot/wt && got histedit -d >/dev/null)
241 6d7eb4f7 2023-04-04 thomas ret=$?
242 6d7eb4f7 2023-04-04 thomas if [ $ret -ne 0 ]; then
243 6d7eb4f7 2023-04-04 thomas echo "got histedit failed unexpectedly" >&2
244 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
245 6d7eb4f7 2023-04-04 thomas return 1
246 6d7eb4f7 2023-04-04 thomas fi
247 6d7eb4f7 2023-04-04 thomas
248 6d7eb4f7 2023-04-04 thomas # The client should reject sending without -f.
249 6d7eb4f7 2023-04-04 thomas got send -q -r $testroot/repo-clone 2> $testroot/stderr
250 6d7eb4f7 2023-04-04 thomas ret=$?
251 6d7eb4f7 2023-04-04 thomas if [ $ret -eq 0 ]; then
252 6d7eb4f7 2023-04-04 thomas echo "got send succeeded unexpectedly" >&2
253 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
254 6d7eb4f7 2023-04-04 thomas return 1
255 6d7eb4f7 2023-04-04 thomas fi
256 6d7eb4f7 2023-04-04 thomas
257 6d7eb4f7 2023-04-04 thomas echo 'got: refs/heads/main: fetch and rebase required' \
258 6d7eb4f7 2023-04-04 thomas >> $testroot/stderr.expected
259 6d7eb4f7 2023-04-04 thomas if ! cmp -s $testroot/stderr.expected $testroot/stderr; then
260 6d7eb4f7 2023-04-04 thomas diff -u $testroot/stderr.expected $testroot/stderr
261 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
262 6d7eb4f7 2023-04-04 thomas return 1
263 6d7eb4f7 2023-04-04 thomas fi
264 6d7eb4f7 2023-04-04 thomas
265 6d7eb4f7 2023-04-04 thomas # Try again with -f.
266 6d7eb4f7 2023-04-04 thomas got send -q -r $testroot/repo-clone -f 2> $testroot/stderr
267 6d7eb4f7 2023-04-04 thomas ret=$?
268 6d7eb4f7 2023-04-04 thomas if [ $ret -eq 0 ]; then
269 6d7eb4f7 2023-04-04 thomas echo "got send succeeded unexpectedly" >&2
270 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
271 6d7eb4f7 2023-04-04 thomas return 1
272 6d7eb4f7 2023-04-04 thomas fi
273 6d7eb4f7 2023-04-04 thomas
274 6d7eb4f7 2023-04-04 thomas if ! egrep -q '(gotsh|got-send-pack): refs/heads/main: reference is protected' \
275 6d7eb4f7 2023-04-04 thomas $testroot/stderr; then
276 6d7eb4f7 2023-04-04 thomas echo -n "error message unexpected or missing: " >&2
277 6d7eb4f7 2023-04-04 thomas cat $testroot/stderr >&2
278 6d7eb4f7 2023-04-04 thomas test_done "$testroot" 1
279 6d7eb4f7 2023-04-04 thomas return 1
280 6d7eb4f7 2023-04-04 thomas fi
281 6d7eb4f7 2023-04-04 thomas
282 6d7eb4f7 2023-04-04 thomas # Verify that the send -f operation did not have any effect.
283 6d7eb4f7 2023-04-04 thomas got clone -l ${GOTD_TEST_REPO_URL} | grep main > $testroot/stdout
284 6d7eb4f7 2023-04-04 thomas ret=$?
285 6d7eb4f7 2023-04-04 thomas if [ $ret -ne 0 ]; then
286 6d7eb4f7 2023-04-04 thomas echo "got clone -l failed unexpectedly" >&2
287 6d7eb4f7 2023-04-04 thomas test_done "$testroot" "1"
288 6d7eb4f7 2023-04-04 thomas return 1
289 6d7eb4f7 2023-04-04 thomas fi
290 6d7eb4f7 2023-04-04 thomas
291 6d7eb4f7 2023-04-04 thomas echo "HEAD: refs/heads/main" > $testroot/stdout.expected
292 6d7eb4f7 2023-04-04 thomas echo "refs/heads/main: $commit_id" >> $testroot/stdout.expected
293 6d7eb4f7 2023-04-04 thomas cmp -s $testroot/stdout.expected $testroot/stdout
294 6d7eb4f7 2023-04-04 thomas ret=$?
295 6d7eb4f7 2023-04-04 thomas if [ $ret -ne 0 ]; then
296 6d7eb4f7 2023-04-04 thomas diff -u $testroot/stdout.expected $testroot/stdout
297 6d7eb4f7 2023-04-04 thomas fi
298 6d7eb4f7 2023-04-04 thomas
299 6d7eb4f7 2023-04-04 thomas test_done "$testroot" $ret
300 6d7eb4f7 2023-04-04 thomas }
301 6d7eb4f7 2023-04-04 thomas
302 6d7eb4f7 2023-04-04 thomas test_parseargs "$@"
303 6d7eb4f7 2023-04-04 thomas run_test test_create_protected_branch
304 6d7eb4f7 2023-04-04 thomas run_test test_modify_protected_tag_namespace
305 6d7eb4f7 2023-04-04 thomas run_test test_delete_protected_branch
306 6d7eb4f7 2023-04-04 thomas run_test test_modify_protected_branch