Skip to content

Commit

Permalink
fix: build - issue with hydra dns (#3286)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas Burtey <[email protected]>
  • Loading branch information
nicolasburtey and Nicolas Burtey authored Oct 1, 2023
1 parent f6a0e67 commit 80bb62d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,6 @@ export SVIX_CALLBACK_URL=http://bats-tests:8080/webhook/

export KRATOS_PUBLIC_API="http://localhost:4433"
export KRATOS_ADMIN_API="http://localhost:4434"

export HYDRA_PUBLIC_API="http://localhost:4444"
export HYDRA_ADMIN_API="http://localhost:4445"
5 changes: 4 additions & 1 deletion .env.ci
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,7 @@ SVIX_CALLBACK_URL=${SVIX_CALLBACK_URL}
BRIA_API_KEY=${BRIA_API_KEY}

UNSECURE_DEFAULT_LOGIN_CODE=${UNSECURE_DEFAULT_LOGIN_CODE}
UNSECURE_IP_FROM_REQUEST_OBJECT=${UNSECURE_IP_FROM_REQUEST_OBJECT}
UNSECURE_IP_FROM_REQUEST_OBJECT=${UNSECURE_IP_FROM_REQUEST_OBJECT}

HYDRA_PUBLIC_API="http://hydra:4444"
HYDRA_ADMIN_API="http://hydra:4445"
4 changes: 2 additions & 2 deletions test/bats/admin.bats
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ gql_admin_file() {


@test "admin: perform admin queries/mutations" {
client=$(curl -L -s -X POST http://127.0.0.1:4445/admin/clients \
client=$(curl -L -s -X POST $HYDRA_ADMIN_API/admin/clients \
-H 'Content-Type: application/json' \
-d '{
"grant_types": ["client_credentials"],
Expand All @@ -62,7 +62,7 @@ gql_admin_file() {
client_secret=$(echo $client | jq -r '.client_secret')

# get token from client_id and client_secret
admin_token=$(curl -s -X POST http://127.0.0.1:4444/oauth2/token \
admin_token=$(curl -s -X POST $HYDRA_PUBLIC_API/oauth2/token \
-H 'Content-Type: application/x-www-form-urlencoded' \
-u "$client_id:$client_secret" \
-d "grant_type=client_credentials&scope=editor" | jq -r '.access_token'
Expand Down

0 comments on commit 80bb62d

Please sign in to comment.