summaryrefslogtreecommitdiff
path: root/t/lib-credential.sh
diff options
context:
space:
mode:
authorJakub Bereżański <kuba@berezanscy.pl>2017-10-30 17:20:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-11-01 04:46:39 (GMT)
commit3c90bda688afe55eb2c99a1ea1486ebc6bb48ca6 (patch)
tree130d3b244614b3ab481354935766e5934354bd9e /t/lib-credential.sh
parentcb5918aa0d50f50e83787f65c2ddc3dcb10159fe (diff)
downloadgit-3c90bda688afe55eb2c99a1ea1486ebc6bb48ca6.zip
git-3c90bda688afe55eb2c99a1ea1486ebc6bb48ca6.tar.gz
git-3c90bda688afe55eb2c99a1ea1486ebc6bb48ca6.tar.bz2
t0302: check helper can handle empty credentials
Make sure the helper does not crash when blank username and password is provided. If the helper can save such credentials, it should be able to read them back. Signed-off-by: Jakub Bereżański <kuba@berezanscy.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-credential.sh')
-rwxr-xr-xt/lib-credential.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/lib-credential.sh b/t/lib-credential.sh
index d8e41f7..937b831 100755
--- a/t/lib-credential.sh
+++ b/t/lib-credential.sh
@@ -44,6 +44,7 @@ helper_test_clean() {
reject $1 https example.com user2
reject $1 http path.tld user
reject $1 https timeout.tld user
+ reject $1 https sso.tld
}
reject() {
@@ -250,6 +251,24 @@ helper_test() {
password=pass2
EOF
'
+
+ test_expect_success "helper ($HELPER) can store empty username" '
+ check approve $HELPER <<-\EOF &&
+ protocol=https
+ host=sso.tld
+ username=
+ password=
+ EOF
+ check fill $HELPER <<-\EOF
+ protocol=https
+ host=sso.tld
+ --
+ protocol=https
+ host=sso.tld
+ username=
+ password=
+ EOF
+ '
}
helper_test_timeout() {