Merge pull request #17163 from overleaf/jel-dev-env-tests-mongo

[web] Use mongosh for tests in individual modules

GitOrigin-RevId: e2ca316434b39c348efcb0a289652931a6ce95e6
This commit is contained in:
Jessica Lawshe 2024-02-16 09:44:39 -06:00 committed by Copybot
parent 4ad6d3cb5f
commit b8ccb01f88

View file

@ -31,11 +31,11 @@ DOCKER_COMPOSE_TEST_UNIT := \
TEST_ACCEPTANCE_MONGO_INIT := \
$(DOCKER_COMPOSE_TEST_ACCEPTANCE) up -d mongo; \
$(DOCKER_COMPOSE_TEST_ACCEPTANCE) exec -T mongo sh -c ' \
while ! mongo --eval "db.version()" > /dev/null; do \
while ! mongosh --eval "db.version()" > /dev/null; do \
echo "Waiting for Mongo..."; \
sleep 1; \
done; \
mongo --eval "rs.initiate({ _id: \"overleaf\", members: [ { _id: 0, host: \"mongo:27017\" } ] })"'
mongosh --eval "rs.initiate({ _id: \"overleaf\", members: [ { _id: 0, host: \"mongo:27017\" } ] })"'
ifeq (,$(wildcard test/unit))
test_unit: