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
parentMerge branch 'jk/pack-header-parse-alignment-fix' (diff)
parentcredential-cache: respect authtype capability (diff)
downloadgit-73e055d71ea39c54e78b6e9a28ea0d8e7999a5cb.tar.gz
git-73e055d71ea39c54e78b6e9a28ea0d8e7999a5cb.zip
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