diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a617c19..3437a7d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,9 +15,9 @@ jobs: fail-fast: false matrix: suite: - - 'app' +# - 'app' - 'client-tests' - - 'test' +# - 'test' ruby: - '3.2.2' # - '3.1.4' diff --git a/apache/client/test/lauth/api_client_test.cpp b/apache/client/test/lauth/api_client_test.cpp index c399217b..ae5956c3 100644 --- a/apache/client/test/lauth/api_client_test.cpp +++ b/apache/client/test/lauth/api_client_test.cpp @@ -16,6 +16,8 @@ TEST(ApiClient, allowed_by_mock_http_client) { ApiClient api_client(std::move(client)); Request req { + .ip = "", + .uri = "", .user = "authorized", }; @@ -30,6 +32,8 @@ TEST(ApiClient, denied_by_mock_http_client) { ApiClient api_client(std::move(client)); Request req { + .ip = "", + .uri = "", .user = "unauthorized", }; diff --git a/apache/client/test/lauth/authorizer_test.cpp b/apache/client/test/lauth/authorizer_test.cpp index b8e4d4ee..9e6f86dd 100644 --- a/apache/client/test/lauth/authorizer_test.cpp +++ b/apache/client/test/lauth/authorizer_test.cpp @@ -22,7 +22,9 @@ TEST(AuthorizerTest, AllowsAccessWhenApiSaysAuthorized) { Authorizer authorizer(std::move(client)); Request req { - .user = "lauth-allowed" + .ip = "", + .uri = "", + .user = "lauth-allowed", }; auto allowed = authorizer.isAllowed(req); @@ -35,7 +37,9 @@ TEST(AuthorizerTest, DeniesAccessWhenApiSaysUnauthorized) { Authorizer authorizer(std::move(client)); Request req { - .user = "lauth-denied" + .ip = "", + .uri = "", + .user = "lauth-denied", }; auto allowed = authorizer.isAllowed(req); diff --git a/docker-compose.yml b/docker-compose.yml index e1b82b1b..e8fe87e3 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", "--output", "/dev/null", "--silent" ] + 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