From 9a9a8d20b96fb8baca906ededb8cb55386a3d597 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jakub=20Bere=C5=BCa=C5=84ski?= Date: Wed, 26 Jun 2013 11:14:44 +0200 Subject: [PATCH] t0302: check helper can handle empty credentials MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- t/lib-credential.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/t/lib-credential.sh b/t/lib-credential.sh index 957ae936e8..347d98ebde 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() { -- 2.11.4.GIT