mirror of
https://github.com/shankar0123/certctl.git
synced 2026-06-07 21:51:30 +00:00
5553568495
Service layer (63 tests): certificate, agent, audit, job, notification, policy, and renewal services with mock repositories covering threshold alerting, deduplication, status transitions, and job processing. Handler layer (46 tests): certificate and agent HTTP handlers using httptest with mock service interfaces, covering success/error paths, pagination, JSON marshaling, and path parameter extraction. Integration (11 subtests): end-to-end certificate lifecycle test exercising real services and Local CA issuer through HTTP API — create cert, trigger renewal, process jobs, register agent, heartbeat, verify audit trail. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
12 lines
306 B
Go
12 lines
306 B
Go
package handler
|
|
|
|
import "errors"
|
|
|
|
var (
|
|
// Mock errors for testing
|
|
ErrMockServiceFailed = errors.New("mock service error")
|
|
ErrMockNotFound = errors.New("mock not found error")
|
|
ErrMockUnauthorized = errors.New("mock unauthorized error")
|
|
ErrMockConflict = errors.New("mock conflict error")
|
|
)
|