diff options
| author | Junio C Hamano <gitster@pobox.com> | 2017-09-26 14:15:55 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2017-09-26 14:15:55 +0900 |
| commit | 7451fcdc0d3cffdb9aa79d2651830b44a8e052d6 (patch) | |
| tree | 2bb05e00cf7a150c6aff0a7c17966d6450e0c4a1 /t | |
| parent | The ninth batch for 2.15 (diff) | |
| parent | Git 2.14.2 (diff) | |
| download | git-7451fcdc0d3cffdb9aa79d2651830b44a8e052d6.tar.gz git-7451fcdc0d3cffdb9aa79d2651830b44a8e052d6.zip | |
Sync with 2.14.2
* maint:
Git 2.14.2
Git 2.13.6
Git 2.12.5
Git 2.11.4
Git 2.10.5
cvsimport: shell-quote variable used in backticks
archimport: use safe_pipe_capture for user input
shell: drop git-cvsserver support by default
cvsserver: use safe_pipe_capture for `constant commands` as well
cvsserver: use safe_pipe_capture instead of backticks
cvsserver: move safe_pipe_capture() to the main package
Diffstat (limited to 't')
| -rwxr-xr-x | t/t9400-git-cvsserver-server.sh | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh index 432c61d246..c30660d606 100755 --- a/t/t9400-git-cvsserver-server.sh +++ b/t/t9400-git-cvsserver-server.sh @@ -588,4 +588,52 @@ test_expect_success 'cvs annotate' ' test_cmp ../expect ../actual ' +#------------ +# running via git-shell +#------------ + +cd "$WORKDIR" + +test_expect_success 'create remote-cvs helper' ' + write_script remote-cvs <<-\EOF + exec git shell -c "cvs server" + EOF +' + +test_expect_success 'cvs server does not run with vanilla git-shell' ' + ( + cd cvswork && + CVS_SERVER=$WORKDIR/remote-cvs && + export CVS_SERVER && + test_must_fail cvs log merge + ) +' + +test_expect_success 'configure git shell to run cvs server' ' + mkdir "$HOME"/git-shell-commands && + + write_script "$HOME"/git-shell-commands/cvs <<-\EOF && + if ! test $# = 1 && test "$1" = "server" + then + echo >&2 "git-cvsserver only handles \"server\"" + exit 1 + fi + exec git cvsserver server + EOF + + # Should not be used, but part of the recommended setup + write_script "$HOME"/git-shell-commands/no-interactive-login <<-\EOF + echo Interactive login forbidden + EOF +' + +test_expect_success 'cvs server can run with recommended config' ' + ( + cd cvswork && + CVS_SERVER=$WORKDIR/remote-cvs && + export CVS_SERVER && + cvs log merge + ) +' + test_done |
