test(auction): add two-node Docker failure integration suite

Exercise Nginx routing, Mongo transaction ordering, history backfills, Undo, Pub/Sub TCP loss, safety polling, resync, and reconnection. Keep fixtures and results isolated from production and git.
This commit is contained in:
dahyeon committed 2026-11-12 01:49:35 +09:00
1 parent 23a0a3f8dd
commit 8d741ef9a7
9 files changed
+1024

No files matched your search

@@ -0,0 +1,61 @@
x-app: &app
image: ${COMPOSE_PROJECT_NAME}-app
build:
context: ../../../..
dockerfile: apps/api/test/auction-cluster/Dockerfile
environment: &environment
MONGO_TEST_URL: mongodb://mongo:27017/auction_cluster?replicaSet=auction_cluster
REDIS_TEST_URL: redis://redis-proxy:6379
NODE_ENV: test
NEW_RELIC_ENABLED: 'false'
volumes:
- ./results:/results
networks: [cluster]
mem_limit: 1g
services:
redis:
image: redis:8-alpine
command: [redis-server, --save, '', --appendonly, 'no']
networks: [cluster]
mem_limit: 256m
mongo:
# MongoDB 8+ refuses the test host's Linux 7.0.0 kernel (SERVER-121912).
image: ${MONGO_TEST_IMAGE:-mongo:7.0}
command:
[
mongod,
--replSet,
auction_cluster,
--bind_ip_all,
--wiredTigerCacheSizeGB,
'0.25',
]
networks: [cluster]
mem_limit: 768m
redis-proxy:
<<: *app
command: [node, test/auction-cluster/fault-proxy.mjs]
mem_limit: 128m
api-a:
<<: *app
environment:
<<: *environment
CLUSTER_NODE: api-a
api-b:
<<: *app
environment:
<<: *environment
CLUSTER_NODE: api-b
lb:
image: nginx:stable-alpine
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
networks: [cluster]
mem_limit: 128m
runner:
<<: *app
command: [node, test/auction-cluster/run.mjs, verify]
networks:
cluster: {}