mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Merge pull request #27936 from overleaf/em-unit-tests-mongo
Make Mongo available to unit tests in all services GitOrigin-RevId: b65bbb69883d5bba31d09802b89f35bdc523fe4d
This commit is contained in:
@@ -15,14 +15,26 @@ services:
|
||||
- .:/overleaf/services/history-v1
|
||||
- ../../node_modules:/overleaf/node_modules
|
||||
- ../../libraries:/overleaf/libraries
|
||||
- ../../bin/shared/wait_for_it:/overleaf/bin/shared/wait_for_it
|
||||
working_dir: /overleaf/services/history-v1
|
||||
environment:
|
||||
MOCHA_GREP: ${MOCHA_GREP}
|
||||
LOG_LEVEL: ${LOG_LEVEL:-}
|
||||
MONGO_CONNECTION_STRING: mongodb://mongo/test-overleaf
|
||||
NODE_ENV: test
|
||||
NODE_OPTIONS: "--unhandled-rejections=strict"
|
||||
REDIS_HOST: redis_test
|
||||
HISTORY_REDIS_HOST: redis_test
|
||||
QUEUES_REDIS_HOST: redis_test
|
||||
ANALYTICS_QUEUES_REDIS_HOST: redis_test
|
||||
entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
|
||||
command: npm run --silent test:unit
|
||||
user: node
|
||||
depends_on:
|
||||
mongo:
|
||||
condition: service_started
|
||||
redis_test:
|
||||
condition: service_healthy
|
||||
|
||||
test_acceptance:
|
||||
build:
|
||||
@@ -38,10 +50,10 @@ services:
|
||||
working_dir: /overleaf/services/history-v1
|
||||
environment:
|
||||
ELASTIC_SEARCH_DSN: es:9200
|
||||
REDIS_HOST: redis
|
||||
HISTORY_REDIS_HOST: redis
|
||||
QUEUES_REDIS_HOST: redis
|
||||
ANALYTICS_QUEUES_REDIS_HOST: redis
|
||||
REDIS_HOST: redis_test
|
||||
HISTORY_REDIS_HOST: redis_test
|
||||
QUEUES_REDIS_HOST: redis_test
|
||||
ANALYTICS_QUEUES_REDIS_HOST: redis_test
|
||||
MONGO_HOST: mongo
|
||||
POSTGRES_HOST: postgres
|
||||
AWS_S3_ENDPOINT: https://minio:9000
|
||||
@@ -61,7 +73,7 @@ services:
|
||||
depends_on:
|
||||
mongo:
|
||||
condition: service_started
|
||||
redis:
|
||||
redis_test:
|
||||
condition: service_healthy
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
@@ -76,7 +88,7 @@ services:
|
||||
entrypoint: /overleaf/bin/shared/wait_for_it mongo:27017 --timeout=60 --
|
||||
command: npm run --silent test:acceptance
|
||||
|
||||
redis:
|
||||
redis_test:
|
||||
image: redis:7.4.3
|
||||
healthcheck:
|
||||
test: ping=$$(redis-cli ping) && [ "$$ping" = 'PONG' ]
|
||||
|
||||
Reference in New Issue
Block a user