mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:47:32 +00:00
chore: init load tests (#7635)
* init load tests * add machine pat * setup app * add introspect * use xk6-modules repo * logging * add teardown * add manipulate user * add manipulate user * remove logs * convert tests to ts * add readme * zitadel * review comments
This commit is contained in:
45
load-test/Makefile
Normal file
45
load-test/Makefile
Normal file
@@ -0,0 +1,45 @@
|
||||
VUS ?= 20
|
||||
DURATION ?= "200s"
|
||||
ZITADEL_HOST ?=
|
||||
ADMIN_LOGIN_NAME ?=
|
||||
ADMIN_PASSWORD ?=
|
||||
|
||||
.PHONY: human_password_login
|
||||
human_password_login: bundle
|
||||
k6 run dist/human_password_login.js --vus ${VUS} --duration ${DURATION}
|
||||
|
||||
.PHONY: machine_pat_login
|
||||
machine_pat_login: bundle
|
||||
k6 run dist/machine_pat_login.js --vus ${VUS} --duration ${DURATION}
|
||||
|
||||
.PHONY: user_info
|
||||
user_info: bundle
|
||||
k6 run dist/user_info.js --vus ${VUS} --duration ${DURATION}
|
||||
|
||||
.PHONY: manipulate_user
|
||||
manipulate_user: bundle
|
||||
k6 run dist/manipulate_user.js --vus ${VUS} --duration ${DURATION}
|
||||
|
||||
.PHONY: introspect
|
||||
introspect: ensure_modules bundle
|
||||
go install go.k6.io/xk6/cmd/xk6@latest
|
||||
cd ../../xk6-modules && xk6 build --with xk6-zitadel=.
|
||||
./../../xk6-modules/k6 run dist/introspection.js --vus ${VUS} --duration ${DURATION}
|
||||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
npm i
|
||||
npm run lint:fix
|
||||
|
||||
.PHONY: ensure_modules
|
||||
ensure_modules:
|
||||
ifeq (,$(wildcard $(PWD)/../../xk6-modules))
|
||||
@echo "cloning xk6-modules"
|
||||
cd ../.. && git clone https://github.com/zitadel/xk6-modules.git
|
||||
endif
|
||||
cd ../../xk6-modules && git pull
|
||||
|
||||
.PHONY: bundle
|
||||
bundle:
|
||||
npm i
|
||||
npm run bundle
|
Reference in New Issue
Block a user