Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BC-7809 - Add unit tests for tldraw-server #30

Merged
merged 36 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
05f91e1
BC-7809 - add `scripts/generate-client.js` to be ignored by sonarcloud
bergatco Nov 8, 2024
0e142b4
Add validation pipe to server modul
bischofmax Nov 11, 2024
0c4f9c4
Add api test for delete doc controller
bischofmax Nov 11, 2024
ae57465
BC-7809 - refactor Tldraw-Document API test to use local testApiClien…
bergatco Nov 11, 2024
686a576
BC -7809 - add tests for TestApiClient with x-api-key authentication …
bergatco Nov 11, 2024
a996018
BC -7809 - add tests for TestApiClient with x-api-key authentication
bergatco Nov 11, 2024
f7e6c14
Replace testapiclient let with const
bischofmax Nov 11, 2024
5a5353b
Add metrics api test
bischofmax Nov 11, 2024
60a4431
Merge branch 'BC-7809-add-unit-tests-for-tldraw-server' of github.com…
bischofmax Nov 11, 2024
631100f
Add test cases for ws service
bischofmax Nov 11, 2024
90dc873
BC -7809 - add tests for TestApiClient with x-api-key authentication …
bergatco Nov 11, 2024
980eb6e
Merge branch 'main' into BC-7809-add-unit-tests-for-tldraw-server
bergatco Nov 11, 2024
a1fe23a
BC-7809 - fix linter issue
bergatco Nov 11, 2024
a45dc86
Add ADMIN_API__ALLOWED_API_KEYS directly to specific test setup
bischofmax Nov 11, 2024
2ad3c26
Merge branch 'BC-7809-add-unit-tests-for-tldraw-server' of github.com…
bischofmax Nov 11, 2024
1c1aeaa
Revert "Add ADMIN_API__ALLOWED_API_KEYS directly to specific test setup"
bischofmax Nov 11, 2024
05b0495
Mock redis in ServerTestModul
bischofmax Nov 11, 2024
8020d48
Merge branch 'main' into BC-7809-add-unit-tests-for-tldraw-server
bischofmax Nov 11, 2024
38d6c47
BC-7809 - add `.nvmrc` with correct node version 22
bergatco Nov 12, 2024
270a051
refactor: simplify Tldraw-Config API test setup by using ServerTestMo…
SevenWaysDP Nov 12, 2024
e16c7f8
Add build-base to docker file
bischofmax Nov 12, 2024
b3720fd
Merge branch 'BC-7809-add-unit-tests-for-tldraw-server' of github.com…
bischofmax Nov 12, 2024
eb33e6b
Add redis test server to jest global setup
bischofmax Nov 12, 2024
ed243f3
Add minio to test.yml
bischofmax Nov 12, 2024
b8dbdf0
move jest preset files
SevenWaysDP Nov 12, 2024
ff57d53
move api-test-client to infra
SevenWaysDP Nov 12, 2024
a39aa1e
Add basic websocket tests
bischofmax Nov 12, 2024
ab255b6
Merge branch 'BC-7809-add-unit-tests-for-tldraw-server' of github.com…
bischofmax Nov 12, 2024
95071d0
Add more test cases for websocket test
bischofmax Nov 12, 2024
6a67c76
Resolve hasPermission mock with correct response
bischofmax Nov 13, 2024
b3ad20f
Fix entry file path
bischofmax Nov 13, 2024
d9cd177
Remove const on server module
bischofmax Nov 13, 2024
e41831e
Refactor RedisConfig validation logic for cluster settings
SevenWaysDP Nov 13, 2024
bd69f12
Comment out instable test and remove unused import
bischofmax Nov 19, 2024
840ac83
Fix linter issues
bischofmax Nov 19, 2024
6a2657e
Rebuild package lock and remove src path level from nestcli
bischofmax Nov 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
REDIS=redis://localhost:6379
API_HOST=http://localhost:3030
ADMIN_API__ALLOWED_API_KEYS=randomString

Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ jobs:
strategy:
matrix:
shard: [1]
services:
rabbitmq:
image: rabbitmq:3
ports:
- 5672:5672
steps:
- name: checkout
uses: actions/checkout@v4
Expand All @@ -32,6 +27,13 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
- name: npm ci
run: npm ci --prefer-offline --no-audit
- name: Start UP MinIO
uses: infleet/[email protected]
with:
port: "9000"
version: "latest"
username: "miniouser"
password: "miniouser"
- name: test:cov - test all with coverage
timeout-minutes: 15
run: export RUN_WITHOUT_JEST_COVERAGE='true' && export NODE_OPTIONS='--max_old_space_size=4096' && ./node_modules/.bin/jest --shard=${{ matrix.shard }}/${{ strategy.job-total }} --coverage --force-exit
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM docker.io/node:22-alpine

RUN apk add gcompat
RUN apk add --no-cache gcompat build-base

ENV TZ=Europe/Berlin
RUN mkdir /app && chown -R node:node /app
Expand Down
2 changes: 2 additions & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ module.exports = {
collectCoverageFrom: ['**/*.(t|j)s'],
coverageDirectory: '../coverage',
testEnvironment: 'node',
globalSetup: '<rootDir>/../scripts/testing/globalSetup.ts',
globalTeardown: '<rootDir>/../scripts/testing/globalTeardown.ts',
};
Loading
Loading