Commit 806ddd63 by Marcus Efraimsson

load test/ha fixes

parent 95d9328c
...@@ -55,7 +55,8 @@ services: ...@@ -55,7 +55,8 @@ services:
# - GF_DATABASE_SSL_MODE=disable # - GF_DATABASE_SSL_MODE=disable
# - GF_SESSION_PROVIDER=postgres # - GF_SESSION_PROVIDER=postgres
# - GF_SESSION_PROVIDER_CONFIG=user=grafana password=password host=db port=5432 dbname=grafana sslmode=disable # - GF_SESSION_PROVIDER_CONFIG=user=grafana password=password host=db port=5432 dbname=grafana sslmode=disable
- GF_LOG_FILTERS=alerting.notifier:debug,alerting.notifier.slack:debug - GF_LOG_FILTERS=alerting.notifier:debug,alerting.notifier.slack:debug,auth:debug
- GF_LOGIN_ROTATE_TOKEN_MINUTES=2
ports: ports:
- 3000 - 3000
depends_on: depends_on:
......
...@@ -6,8 +6,8 @@ export let options = { ...@@ -6,8 +6,8 @@ export let options = {
noCookiesReset: true noCookiesReset: true
}; };
let endpoint = __ENV.URL || 'http://localhost:3000' let endpoint = __ENV.URL || 'http://localhost:3000';
const client = createClient(endpoint) const client = createClient(endpoint);
export const setup = () => { export const setup = () => {
const basicAuthClient = createBasicAuthClient(endpoint, 'admin', 'admin'); const basicAuthClient = createBasicAuthClient(endpoint, 'admin', 'admin');
......
...@@ -4,17 +4,21 @@ PWD=$(pwd) ...@@ -4,17 +4,21 @@ PWD=$(pwd)
run() { run() {
duration='15m' duration='15m'
url='http://localhost:3000'
while getopts ":d:" o; do while getopts ":d:u:" o; do
case "${o}" in case "${o}" in
d) d)
duration=${OPTARG} duration=${OPTARG}
;; ;;
u)
url=${OPTARG}
;;
esac esac
done done
shift $((OPTIND-1)) shift $((OPTIND-1))
docker run -t --network=host -v $PWD:/src --rm -i loadimpact/k6:master run --vus 2 --duration $duration src/auth_token_test.js docker run -t --network=host -v $PWD:/src -e URL=$url --rm -i loadimpact/k6:master run --vus 2 --duration $duration src/auth_token_test.js
} }
run "$@" run "$@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment