Summary
internal/axonops/ has 0% test coverage across 1046 lines. This is the core I/O boundary — every CRD controller depends on it. Edge cases (malformed JSON, 204 with decode, URL construction with special chars, error classification) are untested directly.
Testing Requirements
Add internal/axonops/client_test.go with httptest-based tests:
TestNewClient_Validation — empty host/orgID/apiKey rejected
TestGetMetricAlertRules_Success / _APIError / _MalformedJSON
TestCreateOrUpdateMetricAlertRule_GeneratesUUID / _Success / _APIError
TestDeleteMetricAlertRule_Success / _404Tolerated
TestCreateKafkaTopic_Success / _APIError
TestDeleteKafkaACL_Success
TestCreateScheduledSnapshot_Success
TestDeleteScheduledRepair_QueryParamID
TestSetAuthHeader_TokenType
TestAPIError_IsRetryable — 4xx returns false, 5xx returns true
Acceptance Criteria
internal/axonops/ coverage > 70%
- All client methods have at least success + error test
go test -race ./internal/axonops/ passes
Priority
P1
Summary
internal/axonops/has 0% test coverage across 1046 lines. This is the core I/O boundary — every CRD controller depends on it. Edge cases (malformed JSON, 204 with decode, URL construction with special chars, error classification) are untested directly.Testing Requirements
Add
internal/axonops/client_test.gowith httptest-based tests:TestNewClient_Validation— empty host/orgID/apiKey rejectedTestGetMetricAlertRules_Success/_APIError/_MalformedJSONTestCreateOrUpdateMetricAlertRule_GeneratesUUID/_Success/_APIErrorTestDeleteMetricAlertRule_Success/_404ToleratedTestCreateKafkaTopic_Success/_APIErrorTestDeleteKafkaACL_SuccessTestCreateScheduledSnapshot_SuccessTestDeleteScheduledRepair_QueryParamIDTestSetAuthHeader_TokenTypeTestAPIError_IsRetryable— 4xx returns false, 5xx returns trueAcceptance Criteria
internal/axonops/coverage > 70%go test -race ./internal/axonops/passesPriority
P1