"""
Integration tests for health and monitoring endpoints.
"""
import pytest


@pytest.mark.integration
class TestHealthEndpoints:
    """Test health check and monitoring endpoints."""
    
    def test_health_check(self, client, db_session):
        """Test health check endpoint."""
        response = client.get("/health")
        assert response.status_code == 200
        data = response.json()
        assert "status" in data
        assert data["status"] in ["healthy", "unhealthy"]
    
    def test_health_check_api_path(self, client, db_session):
        """Test health check endpoint with /api prefix."""
        response = client.get("/api/health")
        assert response.status_code == 200
        data = response.json()
        assert "status" in data
    
    def test_metrics_endpoint(self, client):
        """Test metrics endpoint."""
        response = client.get("/metrics")
        assert response.status_code == 200
        data = response.json()
        assert "status" in data
        assert data["status"] == "success"

