Skip to content

Commit 90d8b94

Browse files
committed
fix: integration tests failing
1 parent cc6ffe9 commit 90d8b94

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

docker-compose.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ services:
1111
DB_MIN_POOL_SIZE: 1
1212
DB_MAX_POOL_SIZE: 2
1313
NOSTR_CONFIG_DIR: /home/node/
14-
SERVER_PORT: 8008
14+
PORT: 8008
1515
DEBUG: worker:event-message-handler,worker:web-socket-server-adapter
1616
user: node:node
1717
volumes:
@@ -56,9 +56,8 @@ services:
5656
entrypoint:
5757
- sh
5858
- -c
59-
- 'cd code && npm install -g [email protected] && npm install knex --quiet && npm run db:migrate'
59+
- 'cd code && npm install --no-save --quiet [email protected] [email protected] && npx knex migrate:latest'
6060
volumes:
61-
- ./package.json:/code/package.json
6261
- ./migrations:/code/migrations
6362
- ./knexfile.js:/code/knexfile.js
6463
depends_on:

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,10 @@
4444
"tor:docker:compose:start": "docker compose -f docker-compose.yml -f docker-compose.tor.yml up --build --remove-orphans",
4545
"tor:hostname": "cat $HOME/.nostr/tor/data/nostr-ts-relay/hostname",
4646
"tor:docker:compose:stop": "docker compose -f docker-compose.yml -f docker-compose.tor.yml down",
47-
"predocker:integration:run": "docker compose -f ./test/integration/docker-compose.yml up -d --quiet-pull --build --remove-orphans",
48-
"docker:integration:run": "docker compose -f ./test/integration/docker-compose.yml run tests",
49-
"postdocker:integration:run": "docker compose -f ./test/integration/docker-compose.yml down",
47+
"docker:integration:run": "docker compose -f ./test/integration/docker-compose.yml run --rm tests",
5048
"docker:test:integration": "npm run docker:integration:run -- npm run test:integration",
51-
"docker:cover:integration": "npm run docker:integration:run -- npm run cover:integration"
49+
"docker:cover:integration": "npm run docker:integration:run -- npm run cover:integration",
50+
"postdocker:integration:run": "docker compose -f ./test/integration/docker-compose.yml down"
5251
},
5352
"repository": {
5453
"type": "git",
@@ -105,7 +104,7 @@
105104
"@noble/secp256k1": "1.7.0",
106105
"debug": "4.3.4",
107106
"joi": "17.6.1",
108-
"knex": "2.3.0",
107+
"knex": "^2.3.0",
109108
"pg": "8.8.0",
110109
"pg-query-stream": "4.2.3",
111110
"ramda": "0.28.0",

test/integration/docker-compose.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ services:
5151
entrypoint:
5252
- sh
5353
- -c
54-
- 'cd code && npm install -g [email protected] && npm install knex --quiet && npm run db:migrate'
54+
- 'cd code && npm install --no-save --quiet [email protected] [email protected] && npx knex migrate:latest'
5555
volumes:
56-
- ../../package.json:/code/package.json
5756
- ../../migrations:/code/migrations
5857
- ../../knexfile.js:/code/knexfile.js
5958
depends_on:

test/integration/features/shared.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ let worker: AppWorker
2222
let dbClient: DatabaseClient
2323

2424
BeforeAll({ timeout: 6000 }, async function () {
25-
process.env.SERVER_PORT = '18808'
25+
process.env.PORT = '18808'
2626
dbClient = getDbClient()
2727
await dbClient.raw('SELECT 1=1')
2828

0 commit comments

Comments
 (0)