diff --git a/tests/conftest.py b/tests/conftest.py index a3fcaa4..f2b81fc 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -54,23 +54,12 @@ def webserver_service_name() -> str: @pytest.fixture(scope="session") def gotenberg_host(docker_services, docker_ip: str, gotenberg_service_name: str) -> str: - def is_responsive(url): - import httpx - - try: - response = httpx.get(url) - except httpx.HTTPError: - logger.exception("Error connecting to service") - return False - else: - return response.status_code == httpx.codes.OK - url = f"http://{docker_ip}:{docker_services.port_for(gotenberg_service_name, 3000)}" docker_services.wait_until_responsive( timeout=30.0, pause=1, - check=lambda: is_responsive(url), + check=lambda: is_responsive(f"{url}/version"), ) return url diff --git a/tests/docker/docker-compose.ci-test-edge.yml b/tests/docker/docker-compose.ci-test-edge.yml index c42d5be..3be1fa6 100644 --- a/tests/docker/docker-compose.ci-test-edge.yml +++ b/tests/docker/docker-compose.ci-test-edge.yml @@ -15,6 +15,5 @@ services: image: docker.io/nginx:1-alpine ports: - "80/tcp" - restart: unless-stopped volumes: - ./content:/usr/share/nginx/html:ro diff --git a/tests/docker/docker-compose.ci-test.yml b/tests/docker/docker-compose.ci-test.yml index 0f75733..c166948 100644 --- a/tests/docker/docker-compose.ci-test.yml +++ b/tests/docker/docker-compose.ci-test.yml @@ -14,6 +14,5 @@ services: image: docker.io/nginx:1-alpine ports: - "80/tcp" - restart: unless-stopped volumes: - ./content:/usr/share/nginx/html:ro