diff --git a/apache/client/test/lauth/api_client_test.cpp b/apache/client/test/lauth/api_client_test.cpp index c399217b..d3b4d015 100644 --- a/apache/client/test/lauth/api_client_test.cpp +++ b/apache/client/test/lauth/api_client_test.cpp @@ -16,6 +16,7 @@ TEST(ApiClient, allowed_by_mock_http_client) { ApiClient api_client(std::move(client)); Request req { + .ip = "", .user = "authorized", }; @@ -30,6 +31,7 @@ TEST(ApiClient, denied_by_mock_http_client) { ApiClient api_client(std::move(client)); Request req { + .ip = "", .user = "unauthorized", }; diff --git a/docker-compose.yml b/docker-compose.yml index e1b82b1b..640f1f42 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -88,17 +88,28 @@ services: - build_cache:/lauth/apache/build mock-api: - profiles: [ "integration" ] + profiles: [ "test", "integration" ] build: context: ./ dockerfile: ./apache/Dockerfile target: tests ports: - "127.0.0.1:9000:9000" + healthcheck: + test: [ "CMD", "curl", "--fail", "http://127.0.0.1:9000", "-s", "-o", "/dev/null" ] + interval: "10s" + timeout: "10s" + retries: 3 + start_period: "2s" + start_interval: "1s" command: ["./http-service", "9000"] client-tests: profiles: [ "test" ] + depends_on: + mock-api: + condition: + "service_healthy" build: context: ./ dockerfile: ./apache/Dockerfile