aboutsummaryrefslogtreecommitdiff
path: root/t/t9400-git-cvsserver-server.sh
diff options
context:
space:
mode:
authorFrank Lichtenheld <frank@lichtenheld.de>2007-05-27 14:33:10 +0200
committerJunio C Hamano <junkio@cox.net>2007-05-29 00:27:21 -0700
commit24a97d84adb649ca5d90c9b1e6d894f4acee1a6b (patch)
treec608b9a730abde24d9e203a1f95e37b2a427225d /t/t9400-git-cvsserver-server.sh
parentb3c81cff02e56a62bd657148da757fdfd8dc6255 (diff)
downloadgit-24a97d84adb649ca5d90c9b1e6d894f4acee1a6b.tar.gz
git-24a97d84adb649ca5d90c9b1e6d894f4acee1a6b.tar.xz
cvsserver: Handle 'cvs login'
Since this is a trivial variation of the general pserver authentication, there is really no reason not to support it. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't/t9400-git-cvsserver-server.sh')
-rwxr-xr-xt/t9400-git-cvsserver-server.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
index 76a9b1a5d..e9ef31517 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