3 test_description
='git-auth tests'
7 test_expect_success
'Test basic authentication.' '
8 "$GIT_AUTH" "$AUTH_KEYTYPE_USER" "$AUTH_KEYTEXT_USER" >out &&
9 grep -q AUR_USER=user out &&
10 grep -q AUR_PRIVILEGED=0 out
13 test_expect_success
'Test Trusted User authentication.' '
14 "$GIT_AUTH" "$AUTH_KEYTYPE_TU" "$AUTH_KEYTEXT_TU" >out &&
15 grep -q AUR_USER=tu out &&
16 grep -q AUR_PRIVILEGED=1 out
19 test_expect_success
'Test authentication with an unsupported key type.' '
20 test_must_fail "$GIT_AUTH" ssh-xxx "$AUTH_KEYTEXT_USER"
23 test_expect_success
'Test authentication with a wrong key.' '
24 "$GIT_AUTH" "$AUTH_KEYTYPE_MISSING" "$AUTH_KEYTEXT_MISSING" >out
25 test_must_be_empty out