test: add infrastructure integration tests for pypi_proxy

This commit is contained in:
Mondo Diaz
2026-02-04 09:53:02 -06:00
parent 7ad5a15ef4
commit 08b6589712

View File

@@ -135,3 +135,18 @@ class TestPyPIPackageNormalization:
assert "text/html" in response.headers.get("content-type", "") assert "text/html" in response.headers.get("content-type", "")
elif response.status_code == 503: elif response.status_code == 503:
assert "No PyPI upstream sources configured" in response.json()["detail"] assert "No PyPI upstream sources configured" in response.json()["detail"]
class TestPyPIProxyInfrastructure:
"""Tests for PyPI proxy infrastructure integration."""
@pytest.mark.integration
def test_health_endpoint_includes_infrastructure(self, integration_client):
"""Health endpoint should report infrastructure status."""
response = integration_client.get("/health")
assert response.status_code == 200
data = response.json()
assert data["status"] == "healthy"
# Infrastructure status may include these if implemented
# assert "infrastructure" in data