Skip to content

Instantly share code, notes, and snippets.

@winstxnhdw
Last active September 21, 2023 22:56
Show Gist options
  • Save winstxnhdw/7db64b009c271eaddcc275a5015ddcf5 to your computer and use it in GitHub Desktop.
Save winstxnhdw/7db64b009c271eaddcc275a5015ddcf5 to your computer and use it in GitHub Desktop.
Docker Compose template for running Consul.NET's testing suite.
services:
consul:
container_name: consul
image: hashicorp/consul-enterprise:1.9.17-ent
network_mode: host
volumes: [./Consul.Test:/config:ro]
command: consul agent -dev -config-file config/test_config.json -log-level=error
healthcheck:
test: ['CMD-SHELL', 'curl localhost:8500/v1/status/leader']
interval: 1s
timeout: 3s
retries: 30
test:
container_name: test
image: mcr.microsoft.com/dotnet/sdk:7.0
network_mode: host
privileged: true
volumes: [.:/app]
command: dotnet test app/Consul.Test --filter "Consul.Test" --configuration=Release -v=Normal --framework=net7.0
restart: on-failure:1
environment:
RUN_CONSUL_ENTERPRISE_TESTS: true
depends_on:
consul:
condition: service_healthy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment