Skip to content

Commit

Permalink
scripts: Resolves e2e test issues
Browse files Browse the repository at this point in the history
  • Loading branch information
arekkas committed May 4, 2018
1 parent 9d27d47 commit 1a8a3b3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions scripts/test-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ set -euo pipefail

cd "$( dirname "${BASH_SOURCE[0]}" )/.."

DATABASE_URL=memory hydra host --dangerous-auto-logon --dangerous-force-http --disable-telemetry &
DATABASE_URL=memory hydra serve --dangerous-force-http --disable-telemetry &
while ! echo exit | nc 127.0.0.1 4444; do sleep 1; done

hydra clients create --id foobar
export HYDRA_URL=http://localhost:4444/
export OAUTH2_CLIENT_ID=foobar
export OAUTH2_CLIENT_SECRET=bazbar

hydra clients create --id $OAUTH_CLIENT_ID --secret $OAUTH_CLIENT_SECRET -g client_credentials
token=$(hydra token client)
hydra token introspect $token
hydra clients delete foobar
curl --header "Authorization: bearer $(hydra token client)" http://localhost:4444/clients
hydra token validate $(hydra token client)

0 comments on commit 1a8a3b3

Please sign in to comment.