scripts: Resolves e2e test issues
@@ -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)
