Skip to content

Commit

Permalink
fix: integration tests failing
Browse files Browse the repository at this point in the history
  • Loading branch information
cameri committed Nov 12, 2022
1 parent cc6ffe9 commit 90d8b94
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
5 changes: 2 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
DB_MIN_POOL_SIZE: 1
DB_MAX_POOL_SIZE: 2
NOSTR_CONFIG_DIR: /home/node/
SERVER_PORT: 8008
PORT: 8008
DEBUG: worker:event-message-handler,worker:web-socket-server-adapter
user: node:node
volumes:
Expand Down Expand Up @@ -56,9 +56,8 @@ services:
entrypoint:
- sh
- -c
- 'cd code && npm install -g knex@2.3.0 && npm install knex --quiet && npm run db:migrate'
- 'cd code && npm install --no-save --quiet knex@2.3.0 pg@8.8.0 && npx knex migrate:latest'
volumes:
- ./package.json:/code/package.json
- ./migrations:/code/migrations
- ./knexfile.js:/code/knexfile.js
depends_on:
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@
"tor:docker:compose:start": "docker compose -f docker-compose.yml -f docker-compose.tor.yml up --build --remove-orphans",
"tor:hostname": "cat $HOME/.nostr/tor/data/nostr-ts-relay/hostname",
"tor:docker:compose:stop": "docker compose -f docker-compose.yml -f docker-compose.tor.yml down",
"predocker:integration:run": "docker compose -f ./test/integration/docker-compose.yml up -d --quiet-pull --build --remove-orphans",
"docker:integration:run": "docker compose -f ./test/integration/docker-compose.yml run tests",
"postdocker:integration:run": "docker compose -f ./test/integration/docker-compose.yml down",
"docker:integration:run": "docker compose -f ./test/integration/docker-compose.yml run --rm tests",
"docker:test:integration": "npm run docker:integration:run -- npm run test:integration",
"docker:cover:integration": "npm run docker:integration:run -- npm run cover:integration"
"docker:cover:integration": "npm run docker:integration:run -- npm run cover:integration",
"postdocker:integration:run": "docker compose -f ./test/integration/docker-compose.yml down"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -105,7 +104,7 @@
"@noble/secp256k1": "1.7.0",
"debug": "4.3.4",
"joi": "17.6.1",
"knex": "2.3.0",
"knex": "^2.3.0",
"pg": "8.8.0",
"pg-query-stream": "4.2.3",
"ramda": "0.28.0",
Expand Down
3 changes: 1 addition & 2 deletions test/integration/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ services:
entrypoint:
- sh
- -c
- 'cd code && npm install -g knex@2.3.0 && npm install knex --quiet && npm run db:migrate'
- 'cd code && npm install --no-save --quiet knex@2.3.0 pg@8.8.0 && npx knex migrate:latest'
volumes:
- ../../package.json:/code/package.json
- ../../migrations:/code/migrations
- ../../knexfile.js:/code/knexfile.js
depends_on:
Expand Down
2 changes: 1 addition & 1 deletion test/integration/features/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ let worker: AppWorker
let dbClient: DatabaseClient

BeforeAll({ timeout: 6000 }, async function () {
process.env.SERVER_PORT = '18808'
process.env.PORT = '18808'
dbClient = getDbClient()
await dbClient.raw('SELECT 1=1')

Expand Down

0 comments on commit 90d8b94

Please sign in to comment.