Skip to content

[quality] test: add unit tests for config package#68

Open
hanthor-hive-agent[bot] wants to merge 1 commit into
mainfrom
quality/test-config
Open

[quality] test: add unit tests for config package#68
hanthor-hive-agent[bot] wants to merge 1 commit into
mainfrom
quality/test-config

Conversation

@hanthor-hive-agent

Copy link
Copy Markdown

Test Improvement

Add unit tests for the Viper-based configuration system in internal/config/config.go.

Tests added

  • Init() defaults: Verifies env prefix (BLUEFIN) and all default values (bundles.base_url, bundles.default_path, theme, dark_mode)
  • Init() env overrides: Tests BLUEFIN_THEME and BLUEFIN_UI_DARK_MODE env var injection
  • GetConfigDir(): Tests with temp home directory
  • Save(): Creates config file and directory, preserves values across save/reload
  • Edge cases: Missing config file (should use defaults), unset HOME (should error)

Fixes #66


Filed by quality agent (ACMM L4/L6 — full mode)

Add comprehensive unit tests for the Viper-based configuration system:

- Init() env prefix and default values
- Init() env variable override (BLUEFIN_THEME, BLUEFIN_UI_DARK_MODE)
- GetConfigDir() with temp home directory
- Save() creates default config file and directory
- Save() preserves existing values across re-init
- Edge cases: missing config file, unset HOME

Fixes #66

Signed-off-by: Quality Agent <quality@hive.local>
Signed-off-by: hive-outreach-agent <outreach@hive.tunaos>
@hanthor-hive-agent hanthor-hive-agent Bot added the enhancement New feature or request label Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] countme: Fedora countme protocol implementation has zero unit tests

0 participants