Skip to content

Commit de5db72

Browse files
Fix explorer links, queue name, CORS, and security headers (#878, #877, #876, #875) (#982)
* fix: resolve explorer links, queue name, CORS, and security headers - Fix blockchain explorer link generation (#878): Use blockchainHash instead of truncated UUID - Fix blockchain recording processor queue name (#877): Align processor with service queue name - Add proper CSP headers and security middleware (#876): CSP, X-Frame-Options, HSTS, Referrer-Policy, Permissions-Policy - Implement proper CORS configuration (#875): Use CORS_ORIGINS env var, refuse wildcard in production * fix: run tests sequentially to avoid database race condition * fix: isolate database tests to prevent parallel race condition --------- Co-authored-by: zainabbaba31-source <zainabbaba31-source@users.noreply.github.com>
1 parent fbe1fc0 commit de5db72

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test
9595

9696
- name: Run tests
97-
run: npm test
97+
run: npm run test:all
9898
env:
9999
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test
100100
JWT_SECRET: test-secret-key

‎jest.config.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ module.exports = {
1212
testEnvironment: 'node',
1313
testTimeout: 30000,
1414
passWithNoTests: true,
15+
testPathIgnorePatterns: ['/test/database/'],
1516
};

‎package.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
"start:prod": "node dist/main",
1919
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
2020
"test": "jest",
21+
"test:all": "jest && jest test/database --runInBand",
22+
"test:database": "jest test/database --runInBand",
2123
"test:watch": "jest --watch",
2224
"test:cov": "jest --coverage",
2325
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",

0 commit comments

Comments
 (0)