From 8739fda21894d898f82bd0311aa44747f78f4146 Mon Sep 17 00:00:00 2001 From: kovagoadi Date: Thu, 25 Dec 2025 18:59:46 +0100 Subject: [PATCH] Use real tests --- tests/e2e/test_traefik.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tests/e2e/test_traefik.py b/tests/e2e/test_traefik.py index 551e5d6..dc44ee3 100644 --- a/tests/e2e/test_traefik.py +++ b/tests/e2e/test_traefik.py @@ -17,9 +17,9 @@ def mock_webserver(): """Start ephemeral mock webserver containers and configure Traefik.""" import time - # Skip mocks in CI environment + # Skip ephemeral mocks in CI environment; test against real services if os.getenv("CI"): - print("CI environment detected. Skipping mock webserver setup.") + print("CI environment detected. Skipping ephemeral mock setup; testing against real services.") yield return @@ -144,7 +144,6 @@ def test_https_redirect(): except requests.exceptions.RequestException as e: pytest.fail(f"Failed to connect to {BASE_URL}: {e}") -@pytest.mark.skipif(os.getenv("CI") is not None, reason="Skipping mock-dependent test in CI") def test_unknown_host_404(): """Verify that requests to an unknown host (hitting legacy-nginx catch-all) are routed to the mock.""" try: @@ -157,7 +156,6 @@ def test_unknown_host_404(): except requests.exceptions.RequestException as e: pytest.fail(f"Failed to connect to {BASE_URL}: {e}") -@pytest.mark.skipif(os.getenv("CI") is not None, reason="Skipping mock-dependent test in CI") def test_unknown_host_https_passthrough(): """Verify that HTTPS requests to an unknown host are passed through to the mock Nginx.""" # We use curl to handle SNI and self-signed certs @@ -176,7 +174,6 @@ def test_unknown_host_https_passthrough(): except subprocess.TimeoutExpired: pytest.fail("Curl timed out") -@pytest.mark.skipif(os.getenv("CI") is not None, reason="Skipping mock-dependent test in CI") def test_staging_http_routing(): """Verify HTTP requests to *.staging.kovagoadi.hu are routed to the mock.""" host = "foo.staging.kovagoadi.hu" @@ -188,7 +185,6 @@ def test_staging_http_routing(): except requests.exceptions.RequestException as e: pytest.fail(f"Failed to connect to {BASE_URL} with host {host}: {e}") -@pytest.mark.skipif(os.getenv("CI") is not None, reason="Skipping mock-dependent test in CI") def test_dev_http_routing(): """Verify HTTP requests to *.dev.kovagoadi.hu are routed to the mock.""" host = "bar.dev.kovagoadi.hu" @@ -200,7 +196,6 @@ def test_dev_http_routing(): except requests.exceptions.RequestException as e: pytest.fail(f"Failed to connect to {BASE_URL} with host {host}: {e}") -@pytest.mark.skipif(os.getenv("CI") is not None, reason="Skipping mock-dependent test in CI") def test_staging_https_routing(): """Verify HTTPS requests to *.staging.kovagoadi.hu are routed to the mock.""" host = "foo.staging.kovagoadi.hu" @@ -218,7 +213,6 @@ def test_staging_https_routing(): except subprocess.TimeoutExpired: pytest.fail("Curl timed out") -@pytest.mark.skipif(os.getenv("CI") is not None, reason="Skipping mock-dependent test in CI") def test_dev_https_routing(): """Verify HTTPS requests to *.dev.kovagoadi.hu are routed to the mock.""" host = "bar.dev.kovagoadi.hu"