t0001: Add more git-auth tests

Test the authentication script with an invalid key type and with a key
that does not exist in the database.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Lukas Fleischer 2016-08-05 21:00:02 +02:00
parent 3a41f8d564
commit 008eace8db
2 changed files with 13 additions and 0 deletions

View file

@ -16,4 +16,13 @@ test_expect_success 'Test Trusted User authentication.' '
grep -q AUR_PRIVILEGED=1 out
'
test_expect_success 'Test authentication with an unsupported key type.' '
test_must_fail "$GIT_AUTH" ssh-xxx "$AUTH_KEYTEXT_USER"
'
test_expect_success 'Test authentication with a wrong key.' '
"$GIT_AUTH" "$AUTH_KEYTYPE_MISSING" "$AUTH_KEYTEXT_MISSING" >out
test_must_be_empty out
'
test_done