Diff options
Diffstat (limited to '')
-rwxr-xr-xtests/t0505-auth.sh14
1 file changed, 2 insertions, 12 deletions
diff --git a/tests/t0505-auth.sh b/tests/t0505-auth.sh
index be0f0ce..7dd4a36 100755
--- a/tests/t0505-auth.sh
+++ b/tests/t0505-auth.sh
@@ -13,10 +13,6 @@ CGIT_TEST_NO_CREATE_REPOS=YesPlease
. ./setup.sh
. "$TEST_OUTPUT_DIRECTORY/extensions/lib.sh"
-interpreters=$(ext_lua_interpreters 5)
-test -z "$interpreters" &&
- say 'no standalone lua on the path, unit checks skipped'
-
for lua in $interpreters
do
for variant in inline file
@@ -38,17 +34,11 @@ test_expect_success 'create a repository with one commit' '
'
if test "$CGIT_HAS_LUA" -eq 1 &&
- cgit_lua_probe "$PWD/repos/authy/.git" openssl.rand openssl.hmac posix.sys.stat posix.unistd
-then
- test_set_prereq CGIT_LUA_AUTH
-elif test "$CGIT_HAS_LUA" -eq 1
+ ! cgit_lua_probe "$PWD/repos/authy/.git" openssl.rand openssl.hmac posix.sys.stat posix.unistd
then
test_set_prereq CGIT_LUA_NOAUTH
say 'cgit lua lacks luaossl or luaposix, expecting protected pages refused'
-else
- say 'cgit built without lua, checks through cgit skipped'
fi
-test "$CGIT_HAS_LUA" -eq 1 && test_set_prereq CGIT_LUA
test_expect_success CGIT_LUA 'point cgit at the unedited auth filter' '
cat >cgitrc <<-EOF
@@ -79,7 +69,7 @@ test_expect_success CGIT_LUA_NOAUTH 'without the modules a protected repository
repo.url=authy
repo.path=$PWD/repos/authy/.git
EOF
- CGIT_CONFIG="$PWD/guardedrc" QUERY_STRING="url=authy/log/" cgit >tmp &&
+ cgit_rc guardedrc "url=authy/log/" >tmp &&
! grep "guarded commit" tmp &&
grep "Unable to complete the request" tmp
'