From 3f10958f47f4704b897a90c2ce676d0d094fee93 Mon Sep 17 00:00:00 2001 From: vindard <17693119+vindard@users.noreply.github.com> Date: Mon, 8 Jan 2024 13:11:39 -0400 Subject: [PATCH] test(core): move oathkeeper bats tests --- .../test/bats => bats/core/api}/oathkeeper.bats | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) rename {core/api/test/bats => bats/core/api}/oathkeeper.bats (91%) diff --git a/core/api/test/bats/oathkeeper.bats b/bats/core/api/oathkeeper.bats similarity index 91% rename from core/api/test/bats/oathkeeper.bats rename to bats/core/api/oathkeeper.bats index 54ecfab0d9..4c52ae59aa 100644 --- a/core/api/test/bats/oathkeeper.bats +++ b/bats/core/api/oathkeeper.bats @@ -1,16 +1,9 @@ #!/usr/bin/env bats -load "helpers/setup-and-teardown" +load "../../helpers/_common.bash" +load "../../helpers/user.bash" -setup_file() { - start_server -} - -teardown_file() { - stop_server -} - -OATHKEEPER_ENDPOINT=${OATHKEEPER_ENDPOINT:-"http://127.0.0.1:4456/decisions/"} +OATHKEEPER_ENDPOINT="http://localhost:4456/decisions/" check_is_uuid() { uuid_string=$1 @@ -109,7 +102,7 @@ oathkeeper_jwt() { } @test "oathkeeper: return userId if bearer assets is present" { - login_user "$ALICE_TOKEN_NAME" "$ALICE_PHONE" "$CODE" + create_user 'alice' exec_oathkeeper 'alice' jwt=$(oathkeeper_jwt)