<commit_before>#!/usr/bin/env bash

set -euo pipefail

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

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

hydra clients create --id foobar
hydra clients delete foobar
curl --header "Authorization: bearer $(hydra token client)" http://localhost:4444/clients
hydra token validate $(hydra token client)<commit_msg>scripts: Resolves e2e test issues<commit_after>#!/usr/bin/env bash

set -euo pipefail

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

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

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
{'fraction_non_alphanumeric': 0.12202380952380952, 'fraction_numerical': 0.034722222222222224, 'mean_word_length': 4.900584795321637, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5588819', 'n_tokens_mistral': 392, 'n_tokens_neox': 348, 'n_words': 99}