mirror of
https://github.com/git/git.git
synced 2026-02-07 08:15:23 +00:00
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>
This commit is contained in:
committed by
Karsten Blees
parent
20ba112c95
commit
0dd0cfbcb6
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user