Sync with 2.10.5
[git/git.git] / t / t9400-git-cvsserver-server.sh
1 #!/bin/sh
2 #
3 # Copyright (c) 2007 Frank Lichtenheld
4 #
5
6 test_description='git-cvsserver access
7
8 tests read access to a git repository with the
9 cvs CLI client via git-cvsserver server'
10
11 . ./test-lib.sh
12
13 if ! test_have_prereq PERL; then
14 skip_all='skipping git cvsserver tests, perl not available'
15 test_done
16 fi
17 cvs >/dev/null 2>&1
18 if test $? -ne 1
19 then
20 skip_all='skipping git-cvsserver tests, cvs not found'
21 test_done
22 fi
23 perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
24 skip_all='skipping git-cvsserver tests, Perl SQLite interface unavailable'
25 test_done
26 }
27
28 WORKDIR=$PWD
29 SERVERDIR=$PWD/gitcvs.git
30 git_config="$SERVERDIR/config"
31 CVSROOT=":fork:$SERVERDIR"
32 CVSWORK="$PWD/cvswork"
33 CVS_SERVER=git-cvsserver
34 export CVSROOT CVS_SERVER
35
36 rm -rf "$CVSWORK" "$SERVERDIR"
37 test_expect_success 'setup' '
38 git config push.default matching &&
39 echo >empty &&
40 git add empty &&
41 git commit -q -m "First Commit" &&
42 mkdir secondroot &&
43 ( cd secondroot &&
44 git init &&
45 touch secondrootfile &&
46 git add secondrootfile &&
47 git commit -m "second root") &&
48 git fetch secondroot master &&
49 git merge --allow-unrelated-histories FETCH_HEAD &&
50 git clone -q --bare "$WORKDIR/.git" "$SERVERDIR" >/dev/null 2>&1 &&
51 GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled true &&
52 GIT_DIR="$SERVERDIR" git config gitcvs.logfile "$SERVERDIR/gitcvs.log" &&
53 GIT_DIR="$SERVERDIR" git config gitcvs.authdb "$SERVERDIR/auth.db" &&
54 echo cvsuser:cvGVEarMLnhlA > "$SERVERDIR/auth.db"
55 '
56
57 # note that cvs doesn't accept absolute pathnames
58 # as argument to co -d
59 test_expect_success 'basic checkout' \
60 'GIT_CONFIG="$git_config" cvs -Q co -d cvswork master &&
61 test "$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5 | head -n 1))" = "empty/1.1/" &&
62 test "$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5 | sed -ne \$p))" = "secondrootfile/1.1/"'
63
64 #------------------------
65 # PSERVER AUTHENTICATION
66 #------------------------
67
68 cat >request-anonymous <<EOF
69 BEGIN AUTH REQUEST
70 $SERVERDIR
71 anonymous
72
73 END AUTH REQUEST
74 EOF
75
76 cat >request-git <<EOF
77 BEGIN AUTH REQUEST
78 $SERVERDIR
79 git
80
81 END AUTH REQUEST
82 EOF
83
84 cat >login-anonymous <<EOF
85 BEGIN VERIFICATION REQUEST
86 $SERVERDIR
87 anonymous
88
89 END VERIFICATION REQUEST
90 EOF
91
92 cat >login-git <<EOF
93 BEGIN VERIFICATION REQUEST
94 $SERVERDIR
95 git
96
97 END VERIFICATION REQUEST
98 EOF
99
100 cat >login-git-ok <<EOF
101 BEGIN VERIFICATION REQUEST
102 $SERVERDIR
103 cvsuser
104 Ah<Z:yZZ30 e
105 END VERIFICATION REQUEST
106 EOF
107
108 test_expect_success 'pserver authentication' \
109 'cat request-anonymous | git-cvsserver pserver >log 2>&1 &&
110 sed -ne \$p log | grep "^I LOVE YOU\$"'
111
112 test_expect_success 'pserver authentication failure (non-anonymous user)' \
113 'if cat request-git | git-cvsserver pserver >log 2>&1
114 then
115 false
116 else
117 true
118 fi &&
119 sed -ne \$p log | grep "^I HATE YOU\$"'
120
121 test_expect_success 'pserver authentication success (non-anonymous user with password)' \
122 'cat login-git-ok | git-cvsserver pserver >log 2>&1 &&
123 sed -ne \$p log | grep "^I LOVE YOU\$"'
124
125 test_expect_success 'pserver authentication (login)' \
126 'cat login-anonymous | git-cvsserver pserver >log 2>&1 &&
127 sed -ne \$p log | grep "^I LOVE YOU\$"'
128
129 test_expect_success 'pserver authentication failure (login/non-anonymous user)' \
130 'if cat login-git | git-cvsserver pserver >log 2>&1
131 then
132 false
133 else
134 true
135 fi &&
136 sed -ne \$p log | grep "^I HATE YOU\$"'
137
138
139 # misuse pserver authentication for testing of req_Root
140
141 cat >request-relative <<EOF
142 BEGIN AUTH REQUEST
143 gitcvs.git
144 anonymous
145
146 END AUTH REQUEST
147 EOF
148
149 cat >request-conflict <<EOF
150 BEGIN AUTH REQUEST
151 $SERVERDIR
152 anonymous
153
154 END AUTH REQUEST
155 Root $WORKDIR
156 EOF
157
158 test_expect_success 'req_Root failure (relative pathname)' \
159 'if cat request-relative | git-cvsserver pserver >log 2>&1
160 then
161 echo unexpected success
162 false
163 else
164 true
165 fi &&
166 tail log | grep "^error 1 Root must be an absolute pathname$"'
167
168 test_expect_success 'req_Root failure (conflicting roots)' \
169 'cat request-conflict | git-cvsserver pserver >log 2>&1 &&
170 tail log | grep "^error 1 Conflicting roots specified$"'
171
172 test_expect_success 'req_Root (strict paths)' \
173 'cat request-anonymous | git-cvsserver --strict-paths pserver "$SERVERDIR" >log 2>&1 &&
174 sed -ne \$p log | grep "^I LOVE YOU\$"'
175
176 test_expect_success 'req_Root failure (strict-paths)' '
177 ! cat request-anonymous |
178 git-cvsserver --strict-paths pserver "$WORKDIR" >log 2>&1
179 '
180
181 test_expect_success 'req_Root (w/o strict-paths)' \
182 'cat request-anonymous | git-cvsserver pserver "$WORKDIR/" >log 2>&1 &&
183 sed -ne \$p log | grep "^I LOVE YOU\$"'
184
185 test_expect_success 'req_Root failure (w/o strict-paths)' '
186 ! cat request-anonymous |
187 git-cvsserver pserver "$WORKDIR/gitcvs" >log 2>&1
188 '
189
190 cat >request-base <<EOF
191 BEGIN AUTH REQUEST
192 /gitcvs.git
193 anonymous
194
195 END AUTH REQUEST
196 Root /gitcvs.git
197 EOF
198
199 test_expect_success 'req_Root (base-path)' \
200 'cat request-base | git-cvsserver --strict-paths --base-path "$WORKDIR/" pserver "$SERVERDIR" >log 2>&1 &&
201 sed -ne \$p log | grep "^I LOVE YOU\$"'
202
203 test_expect_success 'req_Root failure (base-path)' '
204 ! cat request-anonymous |
205 git-cvsserver --strict-paths --base-path "$WORKDIR" pserver "$SERVERDIR" >log 2>&1
206 '
207
208 GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled false || exit 1
209
210 test_expect_success 'req_Root (export-all)' \
211 'cat request-anonymous | git-cvsserver --export-all pserver "$WORKDIR" >log 2>&1 &&
212 sed -ne \$p log | grep "^I LOVE YOU\$"'
213
214 test_expect_success 'req_Root failure (export-all w/o whitelist)' \
215 '! (cat request-anonymous | git-cvsserver --export-all pserver >log 2>&1 || false)'
216
217 test_expect_success 'req_Root (everything together)' \
218 'cat request-base | git-cvsserver --export-all --strict-paths --base-path "$WORKDIR/" pserver "$SERVERDIR" >log 2>&1 &&
219 sed -ne \$p log | grep "^I LOVE YOU\$"'
220
221 GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled true || exit 1
222
223 #--------------
224 # CONFIG TESTS
225 #--------------
226
227 test_expect_success 'gitcvs.enabled = false' \
228 'GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled false &&
229 if GIT_CONFIG="$git_config" cvs -Q co -d cvswork2 master >cvs.log 2>&1
230 then
231 echo unexpected cvs success
232 false
233 else
234 true
235 fi &&
236 grep "GITCVS emulation disabled" cvs.log &&
237 test ! -d cvswork2'
238
239 rm -fr cvswork2
240 test_expect_success 'gitcvs.ext.enabled = true' \
241 'GIT_DIR="$SERVERDIR" git config --bool gitcvs.ext.enabled true &&
242 GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled false &&
243 GIT_CONFIG="$git_config" cvs -Q co -d cvswork2 master >cvs.log 2>&1 &&
244 test_cmp cvswork cvswork2'
245
246 rm -fr cvswork2
247 test_expect_success 'gitcvs.ext.enabled = false' \
248 'GIT_DIR="$SERVERDIR" git config --bool gitcvs.ext.enabled false &&
249 GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled true &&
250 if GIT_CONFIG="$git_config" cvs -Q co -d cvswork2 master >cvs.log 2>&1
251 then
252 echo unexpected cvs success
253 false
254 else
255 true
256 fi &&
257 grep "GITCVS emulation disabled" cvs.log &&
258 test ! -d cvswork2'
259
260 rm -fr cvswork2
261 test_expect_success 'gitcvs.dbname' \
262 'GIT_DIR="$SERVERDIR" git config --bool gitcvs.ext.enabled true &&
263 GIT_DIR="$SERVERDIR" git config gitcvs.dbname %Ggitcvs.%a.%m.sqlite &&
264 GIT_CONFIG="$git_config" cvs -Q co -d cvswork2 master >cvs.log 2>&1 &&
265 test_cmp cvswork cvswork2 &&
266 test -f "$SERVERDIR/gitcvs.ext.master.sqlite" &&
267 cmp "$SERVERDIR/gitcvs.master.sqlite" "$SERVERDIR/gitcvs.ext.master.sqlite"'
268
269 rm -fr cvswork2
270 test_expect_success 'gitcvs.ext.dbname' \
271 'GIT_DIR="$SERVERDIR" git config --bool gitcvs.ext.enabled true &&
272 GIT_DIR="$SERVERDIR" git config gitcvs.ext.dbname %Ggitcvs1.%a.%m.sqlite &&
273 GIT_DIR="$SERVERDIR" git config gitcvs.dbname %Ggitcvs2.%a.%m.sqlite &&
274 GIT_CONFIG="$git_config" cvs -Q co -d cvswork2 master >cvs.log 2>&1 &&
275 test_cmp cvswork cvswork2 &&
276 test -f "$SERVERDIR/gitcvs1.ext.master.sqlite" &&
277 test ! -f "$SERVERDIR/gitcvs2.ext.master.sqlite" &&
278 cmp "$SERVERDIR/gitcvs.master.sqlite" "$SERVERDIR/gitcvs1.ext.master.sqlite"'
279
280
281 #------------
282 # CVS UPDATE
283 #------------
284
285 rm -fr "$SERVERDIR"
286 cd "$WORKDIR" &&
287 git clone -q --bare "$WORKDIR/.git" "$SERVERDIR" >/dev/null 2>&1 &&
288 GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled true &&
289 GIT_DIR="$SERVERDIR" git config gitcvs.logfile "$SERVERDIR/gitcvs.log" ||
290 exit 1
291
292 test_expect_success 'cvs update (create new file)' \
293 'echo testfile1 >testfile1 &&
294 git add testfile1 &&
295 git commit -q -m "Add testfile1" &&
296 git push gitcvs.git >/dev/null &&
297 cd cvswork &&
298 GIT_CONFIG="$git_config" cvs -Q update &&
299 test "$(echo $(grep testfile1 CVS/Entries|cut -d/ -f2,3,5))" = "testfile1/1.1/" &&
300 test_cmp testfile1 ../testfile1'
301
302 cd "$WORKDIR"
303 test_expect_success 'cvs update (update existing file)' \
304 'echo line 2 >>testfile1 &&
305 git add testfile1 &&
306 git commit -q -m "Append to testfile1" &&
307 git push gitcvs.git >/dev/null &&
308 cd cvswork &&
309 GIT_CONFIG="$git_config" cvs -Q update &&
310 test "$(echo $(grep testfile1 CVS/Entries|cut -d/ -f2,3,5))" = "testfile1/1.2/" &&
311 test_cmp testfile1 ../testfile1'
312
313 cd "$WORKDIR"
314 #TODO: cvsserver doesn't support update w/o -d
315 test_expect_failure "cvs update w/o -d doesn't create subdir (TODO)" '
316 mkdir test &&
317 echo >test/empty &&
318 git add test &&
319 git commit -q -m "Single Subdirectory" &&
320 git push gitcvs.git >/dev/null &&
321 cd cvswork &&
322 GIT_CONFIG="$git_config" cvs -Q update &&
323 test ! -d test
324 '
325
326 cd "$WORKDIR"
327 test_expect_success 'cvs update (subdirectories)' \
328 '(for dir in A A/B A/B/C A/D E; do
329 mkdir $dir &&
330 echo "test file in $dir" >"$dir/file_in_$(echo $dir|sed -e "s#/# #g")" &&
331 git add $dir;
332 done) &&
333 git commit -q -m "deep sub directory structure" &&
334 git push gitcvs.git >/dev/null &&
335 cd cvswork &&
336 GIT_CONFIG="$git_config" cvs -Q update -d &&
337 (for dir in A A/B A/B/C A/D E; do
338 filename="file_in_$(echo $dir|sed -e "s#/# #g")" &&
339 if test "$(echo $(grep -v ^D $dir/CVS/Entries|cut -d/ -f2,3,5))" = "$filename/1.1/" &&
340 test_cmp "$dir/$filename" "../$dir/$filename"; then
341 :
342 else
343 echo >failure
344 fi
345 done) &&
346 test ! -f failure'
347
348 cd "$WORKDIR"
349 test_expect_success 'cvs update (delete file)' \
350 'git rm testfile1 &&
351 git commit -q -m "Remove testfile1" &&
352 git push gitcvs.git >/dev/null &&
353 cd cvswork &&
354 GIT_CONFIG="$git_config" cvs -Q update &&
355 test -z "$(grep testfile1 CVS/Entries)" &&
356 test ! -f testfile1'
357
358 cd "$WORKDIR"
359 test_expect_success 'cvs update (re-add deleted file)' \
360 'echo readded testfile >testfile1 &&
361 git add testfile1 &&
362 git commit -q -m "Re-Add testfile1" &&
363 git push gitcvs.git >/dev/null &&
364 cd cvswork &&
365 GIT_CONFIG="$git_config" cvs -Q update &&
366 test "$(echo $(grep testfile1 CVS/Entries|cut -d/ -f2,3,5))" = "testfile1/1.4/" &&
367 test_cmp testfile1 ../testfile1'
368
369 cd "$WORKDIR"
370 test_expect_success 'cvs update (merge)' \
371 'echo Line 0 >expected &&
372 for i in 1 2 3 4 5 6 7
373 do
374 echo Line $i >>merge
375 echo Line $i >>expected
376 done &&
377 echo Line 8 >>expected &&
378 git add merge &&
379 git commit -q -m "Merge test (pre-merge)" &&
380 git push gitcvs.git >/dev/null &&
381 cd cvswork &&
382 GIT_CONFIG="$git_config" cvs -Q update &&
383 test "$(echo $(grep merge CVS/Entries|cut -d/ -f2,3,5))" = "merge/1.1/" &&
384 test_cmp merge ../merge &&
385 ( echo Line 0; cat merge ) >merge.tmp &&
386 mv merge.tmp merge &&
387 cd "$WORKDIR" &&
388 echo Line 8 >>merge &&
389 git add merge &&
390 git commit -q -m "Merge test (merge)" &&
391 git push gitcvs.git >/dev/null &&
392 cd cvswork &&
393 sleep 1 && touch merge &&
394 GIT_CONFIG="$git_config" cvs -Q update &&
395 test_cmp merge ../expected'
396
397 cd "$WORKDIR"
398
399 cat >expected.C <<EOF
400 <<<<<<< merge.mine
401 Line 0
402 =======
403 LINE 0
404 >>>>>>> merge.1.3
405 EOF
406
407 for i in 1 2 3 4 5 6 7 8
408 do
409 echo Line $i >>expected.C
410 done
411
412 test_expect_success 'cvs update (conflict merge)' \
413 '( echo LINE 0; cat merge ) >merge.tmp &&
414 mv merge.tmp merge &&
415 git add merge &&
416 git commit -q -m "Merge test (conflict)" &&
417 git push gitcvs.git >/dev/null &&
418 cd cvswork &&
419 GIT_CONFIG="$git_config" cvs -Q update &&
420 test_cmp merge ../expected.C'
421
422 cd "$WORKDIR"
423 test_expect_success 'cvs update (-C)' \
424 'cd cvswork &&
425 GIT_CONFIG="$git_config" cvs -Q update -C &&
426 test_cmp merge ../merge'
427
428 cd "$WORKDIR"
429 test_expect_success 'cvs update (merge no-op)' \
430 'echo Line 9 >>merge &&
431 cp merge cvswork/merge &&
432 git add merge &&
433 git commit -q -m "Merge test (no-op)" &&
434 git push gitcvs.git >/dev/null &&
435 cd cvswork &&
436 sleep 1 && touch merge &&
437 GIT_CONFIG="$git_config" cvs -Q update &&
438 test_cmp merge ../merge'
439
440 cd "$WORKDIR"
441 test_expect_success 'cvs update (-p)' '
442 touch really-empty &&
443 echo Line 1 > no-lf &&
444 printf "Line 2" >> no-lf &&
445 git add really-empty no-lf &&
446 git commit -q -m "Update -p test" &&
447 git push gitcvs.git >/dev/null &&
448 cd cvswork &&
449 GIT_CONFIG="$git_config" cvs update &&
450 rm -f failures &&
451 for i in merge no-lf empty really-empty; do
452 GIT_CONFIG="$git_config" cvs update -p "$i" >$i.out
453 test_cmp $i.out ../$i >>failures 2>&1
454 done &&
455 test -z "$(cat failures)"
456 '
457
458 cd "$WORKDIR"
459 test_expect_success 'cvs update (module list supports packed refs)' '
460 GIT_DIR="$SERVERDIR" git pack-refs --all &&
461 GIT_CONFIG="$git_config" cvs -n up -d 2> out &&
462 grep "cvs update: New directory \`master'\''" < out
463 '
464
465 #------------
466 # CVS STATUS
467 #------------
468
469 cd "$WORKDIR"
470 test_expect_success 'cvs status' '
471 mkdir status.dir &&
472 echo Line > status.dir/status.file &&
473 echo Line > status.file &&
474 git add status.dir status.file &&
475 git commit -q -m "Status test" &&
476 git push gitcvs.git >/dev/null &&
477 cd cvswork &&
478 GIT_CONFIG="$git_config" cvs update &&
479 GIT_CONFIG="$git_config" cvs status | grep "^File: status.file" >../out &&
480 test_line_count = 2 ../out
481 '
482
483 cd "$WORKDIR"
484 test_expect_success 'cvs status (nonrecursive)' '
485 cd cvswork &&
486 GIT_CONFIG="$git_config" cvs status -l | grep "^File: status.file" >../out &&
487 test_line_count = 1 ../out
488 '
489
490 cd "$WORKDIR"
491 test_expect_success 'cvs status (no subdirs in header)' '
492 cd cvswork &&
493 GIT_CONFIG="$git_config" cvs status | grep ^File: >../out &&
494 ! grep / <../out
495 '
496
497 #------------
498 # CVS CHECKOUT
499 #------------
500
501 cd "$WORKDIR"
502 test_expect_success 'cvs co -c (shows module database)' '
503 GIT_CONFIG="$git_config" cvs co -c > out &&
504 grep "^master[ ][ ]*master$" <out &&
505 ! grep -v "^master[ ][ ]*master$" <out
506 '
507
508 #------------
509 # CVS LOG
510 #------------
511
512 # Known issues with git-cvsserver current log output:
513 # - Hard coded "lines: +2 -3" placeholder, instead of real numbers.
514 # - CVS normally does not internally add a blank first line
515 # or a last line with nothing but a space to log messages.
516 # - The latest cvs 1.12.x server sends +0000 timezone (with some hidden "MT"
517 # tagging in the protocol), and if cvs 1.12.x client sees the MT tags,
518 # it converts to local time zone. git-cvsserver doesn't do the +0000
519 # or the MT tags...
520 # - The latest 1.12.x releases add a "commitid:" field on to the end of the
521 # "date:" line (after "lines:"). Maybe we could stick git's commit id
522 # in it? Or does CVS expect a certain number of bits (too few for
523 # a full sha1)?
524 #
525 # Given the above, expect the following test to break if git-cvsserver's
526 # log output is improved. The test is just to ensure it doesn't
527 # accidentally get worse.
528
529 sed -e 's/^x//' -e 's/SP$/ /' > "$WORKDIR/expect" <<EOF
530 x
531 xRCS file: $WORKDIR/gitcvs.git/master/merge,v
532 xWorking file: merge
533 xhead: 1.4
534 xbranch:
535 xlocks: strict
536 xaccess list:
537 xsymbolic names:
538 xkeyword substitution: kv
539 xtotal revisions: 4; selected revisions: 4
540 xdescription:
541 x----------------------------
542 xrevision 1.4
543 xdate: __DATE__; author: author; state: Exp; lines: +2 -3
544 x
545 xMerge test (no-op)
546 xSP
547 x----------------------------
548 xrevision 1.3
549 xdate: __DATE__; author: author; state: Exp; lines: +2 -3
550 x
551 xMerge test (conflict)
552 xSP
553 x----------------------------
554 xrevision 1.2
555 xdate: __DATE__; author: author; state: Exp; lines: +2 -3
556 x
557 xMerge test (merge)
558 xSP
559 x----------------------------
560 xrevision 1.1
561 xdate: __DATE__; author: author; state: Exp; lines: +2 -3
562 x
563 xMerge test (pre-merge)
564 xSP
565 x=============================================================================
566 EOF
567 expectStat="$?"
568
569 cd "$WORKDIR"
570 test_expect_success 'cvs log' '
571 cd cvswork &&
572 test x"$expectStat" = x"0" &&
573 GIT_CONFIG="$git_config" cvs log merge >../out &&
574 sed -e "s%2[0-9][0-9][0-9]/[01][0-9]/[0-3][0-9] [0-2][0-9]:[0-5][0-9]:[0-5][0-9]%__DATE__%" ../out > ../actual &&
575 test_cmp ../expect ../actual
576 '
577
578 #------------
579 # CVS ANNOTATE
580 #------------
581
582 cd "$WORKDIR"
583 test_expect_success 'cvs annotate' '
584 cd cvswork &&
585 GIT_CONFIG="$git_config" cvs annotate merge >../out &&
586 sed -e "s/ .*//" ../out >../actual &&
587 for i in 3 1 1 1 1 1 1 1 2 4; do echo 1.$i; done >../expect &&
588 test_cmp ../expect ../actual
589 '
590
591 #------------
592 # running via git-shell
593 #------------
594
595 cd "$WORKDIR"
596
597 test_expect_success 'create remote-cvs helper' '
598 write_script remote-cvs <<-\EOF
599 exec git shell -c "cvs server"
600 EOF
601 '
602
603 test_expect_success 'cvs server does not run with vanilla git-shell' '
604 (
605 cd cvswork &&
606 CVS_SERVER=$WORKDIR/remote-cvs &&
607 export CVS_SERVER &&
608 test_must_fail cvs log merge
609 )
610 '
611
612 test_expect_success 'configure git shell to run cvs server' '
613 mkdir "$HOME"/git-shell-commands &&
614
615 write_script "$HOME"/git-shell-commands/cvs <<-\EOF &&
616 if ! test $# = 1 && test "$1" = "server"
617 then
618 echo >&2 "git-cvsserver only handles \"server\""
619 exit 1
620 fi
621 exec git cvsserver server
622 EOF
623
624 # Should not be used, but part of the recommended setup
625 write_script "$HOME"/git-shell-commands/no-interactive-login <<-\EOF
626 echo Interactive login forbidden
627 EOF
628 '
629
630 test_expect_success 'cvs server can run with recommended config' '
631 (
632 cd cvswork &&
633 CVS_SERVER=$WORKDIR/remote-cvs &&
634 export CVS_SERVER &&
635 cvs log merge
636 )
637 '
638
639 test_done