Use real tests
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 3s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 57s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
All checks were successful
Remote Deployment Pipeline / Prepare Context (pull_request) Successful in 3s
Remote Deployment Pipeline / Deploy (Staging) (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Dev/Preview) (pull_request) Successful in 57s
Remote Deployment Pipeline / Cleanup Preview (pull_request) Has been skipped
Remote Deployment Pipeline / Deploy (Production) (pull_request) Has been skipped
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user