diff options
Diffstat (limited to 't/t9400-git-cvsserver-server.sh')
-rwxr-xr-x | t/t9400-git-cvsserver-server.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh index 7f9c6e29b2..e9ef315173 100755 --- a/t/t9400-git-cvsserver-server.sh +++ b/t/t9400-git-cvsserver-server.sh @@ -67,6 +67,22 @@ git END AUTH REQUEST EOF +cat >login-anonymous <<EOF +BEGIN VERIFICATION REQUEST +$SERVERDIR +anonymous + +END VERIFICATION REQUEST +EOF + +cat >login-git <<EOF +BEGIN VERIFICATION REQUEST +$SERVERDIR +git + +END VERIFICATION REQUEST +EOF + test_expect_success 'pserver authentication' \ 'cat request-anonymous | git-cvsserver pserver >log 2>&1 && tail -n1 log | grep -q "^I LOVE YOU$"' @@ -80,6 +96,19 @@ test_expect_success 'pserver authentication failure (non-anonymous user)' \ fi && tail -n1 log | grep -q "^I HATE YOU$"' +test_expect_success 'pserver authentication (login)' \ + 'cat login-anonymous | git-cvsserver pserver >log 2>&1 && + tail -n1 log | grep -q "^I LOVE YOU$"' + +test_expect_success 'pserver authentication failure (login/non-anonymous user)' \ + 'if cat login-git | git-cvsserver pserver >log 2>&1 + then + false + else + true + fi && + tail -n1 log | grep -q "^I HATE YOU$"' + #-------------- # CONFIG TESTS @@ -250,6 +279,7 @@ test_expect_success 'cvs update (merge)' \ git commit -q -m "Merge test (merge)" && git push gitcvs.git >/dev/null && cd cvswork && + sleep 1 && touch merge && GIT_CONFIG="$git_config" cvs -Q update && diff -q merge ../expected' @@ -292,6 +322,7 @@ test_expect_success 'cvs update (merge no-op)' \ git commit -q -m "Merge test (no-op)" && git push gitcvs.git >/dev/null && cd cvswork && + sleep 1 && touch merge && GIT_CONFIG="$git_config" cvs -Q update && diff -q merge ../merge' |