[ApiTests] Add a possibility to execute tests locally

This commit is contained in:
Aaro Koivukangas
2026-07-03 13:46:30 +03:00
parent f81e8e59da
commit 5769d7b996
4 changed files with 21 additions and 2 deletions
+3 -1
View File
@@ -56,7 +56,7 @@ cypress/videos/
coverage/
instrumented/
# Pycharm
# Pycharm
.idea
# VS Code
@@ -68,3 +68,5 @@ instrumented/
# Target of shared symlink
services/**/src/shared
!services/backend/.env.test
+4
View File
@@ -74,6 +74,8 @@ services:
image: registry-toska.ext.ocp-prod-0.k8s.it.helsinki.fi/kone-db
profiles:
- oodikone
ports:
- 4321:5432
volumes:
- kone-db-data:/data
@@ -162,6 +164,8 @@ services:
image: registry-toska.ext.ocp-prod-0.k8s.it.helsinki.fi/user-db
profiles:
- oodikone
ports:
- 4320:5432
volumes:
- user-db-data:/data
+12
View File
@@ -0,0 +1,12 @@
CI='true'
NODE_ENV='test'
DB_URL_KONE=postgres://postgres@localhost:4321/kone-db
DB_URL_USER=postgres://postgres@localhost:4320/user-db
FRONT_URL=http://localhost:3000
REDIS=localhost
SECRET_TOKEN=test
SIS_DB_URL=postgres://postgres@localhost:12345/sis-db
SIS_UPDATER_URL=http://localhost:8082
JAMI_URL='http://localhost:3003/'
IMPORTER_DB_API_URL='https://api-toska.apps.ocp-prod-0.k8s.it.helsinki.fi/importer'
CRYPT_KEY='e16730fce263d5270ba8dcf84d068a32556542455e71331880d6c1c5e4db9b4e'
+2 -1
View File
@@ -3,7 +3,8 @@
"private": true,
"scripts": {
"build": "tsc",
"test": "node --import=tsx --test --test-force-exit --test-reporter spec tests/**/*.ts"
"test": "node --import=tsx --test --test-force-exit --test-reporter spec tests/**/*.ts",
"test:local": "node --env-file=.env.test --test-force-exit --import=tsx --test --test-reporter spec tests/**/*.ts"
},
"dependencies": {
"@oodikone/shared": "file:../shared",