From 4f76fdcd99140bfc82b96c9d079d536c712376aa Mon Sep 17 00:00:00 2001 From: Nicolas Burtey Date: Mon, 18 Sep 2023 12:43:30 +0100 Subject: [PATCH] test: fix tests on concourse --- .gitignore | 2 ++ test/bats/auth.bats | 7 ++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 91b60d897e..ec5974ed1e 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,5 @@ generated.gql .*_pid junit.xml + +.next diff --git a/test/bats/auth.bats b/test/bats/auth.bats index b4781d58a7..3959a7d45e 100644 --- a/test/bats/auth.bats +++ b/test/bats/auth.bats @@ -79,16 +79,13 @@ generateTotpCode() { exec_graphql 'charlie' 'identity' id="$(graphql_output '.data.me.id')" - sessions_before_logout=$(curl -s http://127.0.0.1:4434/admin/identities/$id/sessions | jq '[.[] | select(.active == true)] | length') - curl -s http://127.0.0.1:4434/admin/identities/$id/sessions - echo $sessions_before_logout - + sessions_before_logout=$(curl -s $KRATOS_ADMIN_API/admin/identities/$id/sessions | jq '[.[] | select(.active == true)] | length') [[ "$sessions_before_logout" -eq 1 ]] || exit 1 exec_graphql 'charlie' 'logout' [[ "$(graphql_output '.data.userLogout.success')" = "true" ]] || exit 1 - sessions_after_logout=$(curl -s http://127.0.0.1:4434/admin/identities/$id/sessions | jq '[.[] | select(.active == true)] | length') + sessions_after_logout=$(curl -s $KRATOS_ADMIN_API/admin/identities/$id/sessions | jq '[.[] | select(.active == true)] | length') [[ "$sessions_after_logout" -eq 0 ]] || exit 1 }