Reintroduce backwards-compatible hyperlink syntax
[aur.git] / test / t1100-git-auth.sh
blob71d526f263171a64024f212c50c969119ea7757a
1 #!/bin/sh
3 test_description='git-auth tests'
5 . ./setup.sh
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
28 test_done