aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-01-28 13:02:24 -0800
committerJunio C Hamano <gitster@pobox.com>2025-01-28 13:02:24 -0800
commit73e055d71ea39c54e78b6e9a28ea0d8e7999a5cb (patch)
treeaf8e1580ccac7275cb2254b81d206fc9cbc57b25 /t
parentf8b9821f7d4f5239911794d03ac74edf27d711e6 (diff)
parent0b432748507a12b92677653104b18834d83cfb10 (diff)
downloadgit-73e055d71ea39c54e78b6e9a28ea0d8e7999a5cb.tar.gz
Merge branch 'mh/credential-cache-authtype-request-fix'
The "cache" credential back-end did not handle authtype correctly, which has been corrected. * mh/credential-cache-authtype-request-fix: credential-cache: respect authtype capability
Diffstat (limited to 't')
-rw-r--r--t/lib-credential.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/lib-credential.sh b/t/lib-credential.sh
index 58b9c74060..cc6bf9aa5f 100644
--- a/t/lib-credential.sh
+++ b/t/lib-credential.sh
@@ -566,6 +566,21 @@ helper_test_authtype() {
EOF
'
+ test_expect_success "helper ($HELPER) gets authtype and credential only if request has authtype capability" '
+ check fill $HELPER <<-\EOF
+ protocol=https
+ host=git.example.com
+ --
+ protocol=https
+ host=git.example.com
+ username=askpass-username
+ password=askpass-password
+ --
+ askpass: Username for '\''https://git.example.com'\'':
+ askpass: Password for '\''https://askpass-username@git.example.com'\'':
+ EOF
+ '
+
test_expect_success "helper ($HELPER) stores authtype and credential with username" '
check approve $HELPER <<-\EOF
capability[]=authtype