Skip to content

Commit

Permalink
test: fix tests on concourse
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Burtey committed Sep 18, 2023
1 parent cae6182 commit 4f76fdc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ generated.gql
.*_pid

junit.xml

.next
7 changes: 2 additions & 5 deletions test/bats/auth.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 4f76fdc

Please sign in to comment.