CUB-235: Add tests for GET /api/v1/cameras/:id with 24h history #9

Closed
Dex wants to merge 1 commits from agent/dex/CUB-235-camera-detail into dev

1 Commits

Author SHA1 Message Date
Hermes 5100f6be65 CUB-235: add tests for GET /api/v1/cameras/:id endpoint
CI/CD / lint-and-typecheck (pull_request) Successful in 9m27s
CI/CD / test (pull_request) Successful in 7s
CI/CD / build (pull_request) Failing after 9s
CI/CD / deploy (pull_request) Has been skipped
- TestGetCameraDetail_NotFound: returns 404 for missing camera
- TestGetCameraDetail_Success: returns camera + last_status + history
- TestGetCameraDetail_EmptyHistory: camera with no status logs
- TestGetCameraDetail_HistoryLimitedTo100: history capped at 100 entries
- TestGetCameraDetail_MissingID: returns 400 for empty ID param
- TestGetCameraDetail_LastStatusPresent: verifies last_status field
- db_test.go: migration smoke test (documents splitSQL comment bug)
2026-05-23 04:36:18 +00:00