Skip to content

Test: verify health check scheduler records container state #7

@GeiserX

Description

@GeiserX

Context

CashPilot runs a health check scheduler every 5 minutes that records container state in the health_events table. The health score (0-100) is calculated from uptime and restart frequency.

Task

  1. Write a test that simulates health events (start, check_ok, check_down, restart)
  2. Verify the health score calculation produces expected values
  3. Verify the /api/health/scores endpoint returns scores in the correct format

Reference

  • app/main.py — health check scheduler and API endpoints
  • app/database.py — health_events table

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions