-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
priority: mediumP2/P3 - Should haveP2/P3 - Should havetestingTest coverage and CI improvementsTest coverage and CI improvements
Description
Summary
Account and Contact controllers have minimal unit test coverage — only basic reconciliation is tested. Error paths, edge cases, and failure scenarios are not covered.
Current Behaviour
- Account controller: basic reconciliation test only
- Contact controller: basic reconciliation test only
- No tests for API key validation failures, secret not found, contact name resolution failures
Proposed Test Cases
Account Controller
- API key secret not found
- API key secret has wrong key
- GetAccountDetails API error (transient)
- GetAccountDetails API error (auth failure)
- Alert contacts fetch failure (should be non-blocking)
- Multiple accounts with isDefault conflict
- Account update triggers re-validation
- Status fields correctly populated from API response
Contact Controller
- Contact ID lookup success
- Contact name lookup success
- Contact name not found in UptimeRobot
- Multiple contacts with same name
- Account reference not ready
- Account reference not found
- API error during contact resolution
Acceptance Criteria
- Unit test coverage >80% for both controllers
- All error paths tested
- Edge cases documented and covered
- Tests pass in CI
Phase
P2 — Testing Gaps (Phase 2: Trust)
Reactions are currently unavailable
Metadata
Metadata
Labels
priority: mediumP2/P3 - Should haveP2/P3 - Should havetestingTest coverage and CI improvementsTest coverage and CI improvements
Projects
Status
In progress