From: Frank Lichtenheld Date: Sun, 20 May 2007 22:31:58 +0000 (+0200) Subject: t9400: Add some basic pserver tests X-Git-Tag: v1.5.3-rc0~202^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=240ba7f235c9b946678bd6d34826fb73ea8fd90e;p=git.git t9400: Add some basic pserver tests While we can easily test the cvs <-> git-cvsserver communication with :fork: and git-cvsserver server there are some pserver specifics we should test, too. Currently this are two tests of the pserver authentication. Signed-off-by: Frank Lichtenheld Signed-off-by: Junio C Hamano --- diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh index e42943e5b..7f9c6e29b 100755 --- a/t/t9400-git-cvsserver-server.sh +++ b/t/t9400-git-cvsserver-server.sh @@ -47,6 +47,40 @@ test_expect_success 'basic checkout' \ 'GIT_CONFIG="$git_config" cvs -Q co -d cvswork master && test "$(echo $(grep -v ^D cvswork/CVS/Entries|cut -d/ -f2,3,5))" = "empty/1.1/"' +#------------------------ +# PSERVER AUTHENTICATION +#------------------------ + +cat >request-anonymous <request-git <log 2>&1 && + tail -n1 log | grep -q "^I LOVE YOU$"' + +test_expect_success 'pserver authentication failure (non-anonymous user)' \ + 'if cat request-git | git-cvsserver pserver >log 2>&1 + then + false + else + true + fi && + tail -n1 log | grep -q "^I HATE YOU$"' + + #-------------- # CONFIG TESTS #--------------