storj/docker-compose.tests.yaml
Márton Elek 7c854fcde4 Makefile: make test run more safe
This patch suggests small improvements for the previously committed (very nice <3) unit test helper

 * Use non-default ports for postgres + cockroach. This would help to run same services for ad-hoc unit test (for IDE development for example)
 * Use the same flags for cockroach what we use for unit tests (mem store supposed to make tests faster)
 * Use `docker-compose down -v` for removing all networks and annynmous volumes
 * Remove connection limit (I have seen related problems in my jenkins runs)
 * Omit unused databases to avoid getting failures (eg. omit psql when crdb is used)
 * Do not drop cockroach database (full database will be dropped, anyway...): it also makes testing faster

Change-Id: Iadc04f8617a2825ea4f10072bd023a9c86883680
2022-05-31 10:58:26 +00:00

44 lines
1.4 KiB
YAML

# Support services used by tests
version: "3.4"
services:
postgres:
hostname: postgres
image: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5532:5432"
crdb1:
hostname: crdb1
command: [ "start-single-node", "--insecure", "--store=type=mem,size=2GiB", "--http-addr=localhost:8086", "--cache=512MiB", "--max-sql-memory=512MiB" ]
image: cockroachdb/cockroach
ports:
- "26356:26257"
crdb2:
hostname: crdb2
command: [ "start-single-node", "--insecure", "--store=type=mem,size=2GiB", "--http-addr=localhost:8086", "--cache=512MiB", "--max-sql-memory=512MiB" ]
image: cockroachdb/cockroach
ports:
- "26357:26257"
crdb3:
hostname: crdb3
command: [ "start-single-node", "--insecure", "--store=type=mem,size=2GiB", "--http-addr=localhost:8086", "--cache=512MiB", "--max-sql-memory=512MiB" ]
image: cockroachdb/cockroach
ports:
- "26358:26257"
crdb4:
hostname: crdb4
command: [ "start-single-node", "--insecure", "--store=type=mem,size=2GiB", "--http-addr=localhost:8086", "--cache=512MiB", "--max-sql-memory=512MiB" ]
image: cockroachdb/cockroach
ports:
- "26359:26257"
crdb5:
hostname: crdb5
command: [ "start-single-node", "--insecure", "--store=type=mem,size=2GiB", "--http-addr=localhost:8086", "--cache=512MiB", "--max-sql-memory=512MiB" ]
image: cockroachdb/cockroach
ports:
- "26360:26257"