Problem Statement
The internal/config/ package has a config_test.go file but needs more comprehensive test coverage for validation logic, default values, and environment variable overrides to meet the ≥80% coverage target.
Proposed Solution
Add table-driven unit tests covering:
- Default values — verify all config defaults match the documented values in README (e.g., doctor duration = 30s, prometheus addr =
:9090, log level = info)
- Environment variable overrides — verify
KERNO_LOG_LEVEL, KERNO_AI_API_KEY, KERNO_AI_PROVIDER are read correctly
- Invalid config — verify validation catches invalid values (e.g., negative duration, unknown log level, invalid prometheus address)
- Config file loading — verify YAML config file is parsed correctly
Relevant Files
internal/config/config.go — the config struct and loading logic
internal/config/config_test.go — existing tests to extend
Acceptance Criteria
Difficulty
Beginner — requires basic Go testing knowledge. Good way to learn the project's config system.
Problem Statement
The
internal/config/package has aconfig_test.gofile but needs more comprehensive test coverage for validation logic, default values, and environment variable overrides to meet the ≥80% coverage target.Proposed Solution
Add table-driven unit tests covering:
:9090, log level =info)KERNO_LOG_LEVEL,KERNO_AI_API_KEY,KERNO_AI_PROVIDERare read correctlyRelevant Files
internal/config/config.go— the config struct and loading logicinternal/config/config_test.go— existing tests to extendAcceptance Criteria
internal/config/packagego test -race ./internal/config/...Difficulty
Beginner — requires basic Go testing knowledge. Good way to learn the project's config system.