Skip to content

Commit

Permalink
prevent Combiner from running locally when running e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alecps committed Oct 23, 2023
1 parent c564121 commit 6c46f2f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/phone-number-privacy/combiner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"test:debug": "node --inspect ../../../node_modules/.bin/jest --runInBand",
"test:coverage": "yarn test --coverage",
"test:integration": "jest --runInBand test/integration",
"test:e2e": "jest --runInBand test/end-to-end --verbose",
"test:e2e": "E2E_TESTING=true jest --runInBand test/end-to-end --verbose",
"test:e2e:staging": "CONTEXT_NAME=staging yarn test:e2e",
"test:e2e:alfajores": "CONTEXT_NAME=alfajores yarn test:e2e",
"test:e2e:mainnet": "CONTEXT_NAME=mainnet yarn test:e2e"
Expand Down
2 changes: 0 additions & 2 deletions packages/phone-number-privacy/combiner/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
FULL_NODE_TIMEOUT_IN_MS,
RETRY_COUNT,
RETRY_DELAY_IN_MS,
rootLogger,
TestUtils,
toBool,
} from '@celo/phone-number-privacy-common'
Expand Down Expand Up @@ -61,7 +60,6 @@ const defaultMockDEK = ensureLeading0x(
)

if (DEV_MODE) {
rootLogger(defaultServiceName).debug('Running in dev mode')
const devSignersString = JSON.stringify([
{
url: 'http://localhost:3001',
Expand Down
12 changes: 7 additions & 5 deletions packages/phone-number-privacy/combiner/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ async function start() {
})
}

start().catch((err) => {
const logger = rootLogger(config.serviceName)
logger.error({ err }, 'Fatal error occured. Exiting')
process.exit(1)
})
if (!process.env.E2E_TESTING) {
start().catch((err) => {
const logger = rootLogger(config.serviceName)
logger.error({ err }, 'Fatal error occured. Exiting')
process.exit(1)
})
}

export * from './config'
export * from './server'

0 comments on commit 6c46f2f

Please sign in to comment.