Skip to content

Commit

Permalink
Set up environment/deps for client-tests
Browse files Browse the repository at this point in the history
This ensures that the mock API is up so the HttpClient tests can run
without setting anything up or setting environment manually.
  • Loading branch information
botimer committed Nov 13, 2023
1 parent bf9099e commit 14f5a5f
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ services:
context: ./
dockerfile: ./apache/Dockerfile
target: tests
hostname: mock-api.lauth.local
networks:
default:
aliases: ["mock-api"]
ports:
- "127.0.0.1:9000:9000"
healthcheck:
Expand All @@ -107,15 +111,17 @@ services:
command: ["./http-service", "9000"]

client-tests:
profiles: [ "test" ]
depends_on:
mock-api:
condition:
"service_healthy"
profiles: [ "test", "integration" ]
build:
context: ./
dockerfile: ./apache/Dockerfile
target: client-tests
depends_on:
mock-api:
condition:
"service_healthy"
environment:
- LAUTH_TEST_API_URL=http://mock-api.lauth.local:9000

test:
profiles: ["test"]
Expand Down

0 comments on commit 14f5a5f

Please sign in to comment.