meta {
  name: Health Check
  type: http
  seq: 2
}

get {
  url: {{base_url}}/health
  body: none
  auth: none
}

headers {
  Content-Type: application/json
  User-Agent: Bruno/1.0
}

docs {
  # Health Check Endpoint

  Returns the health status of the Model Serving API service.
  This endpoint is used for monitoring and load balancer health checks.

  ## Response

  ```json
  {
    "status": "healthy"
  }
  ```

  ## Status Codes
  - `200 OK` - Service is healthy and operational
  - `503 Service Unavailable` - Service is unhealthy or not ready

  ## Use Cases
  - Kubernetes/Docker health checks
  - Load balancer health probes
  - Monitoring and alerting systems
  - Service discovery health validation

  ## Notes
  - This endpoint should respond quickly (< 100ms)
  - Used by container orchestration platforms
  - Essential for production deployments
}

tests {
  test("Status should be 200", function() {
    expect(res.getStatus()).to.equal(200);
  });

  test("Response should indicate healthy status", function() {
    const data = res.getBody();
    expect(data.status).to.equal("healthy");
  });

  test("Response time should be fast", function() {
    expect(res.getResponseTime()).to.be.below(1000);
  });

  test("Content-Type should be JSON", function() {
    expect(res.getHeader("content-type")).to.contain("application/json");
  });
}
