Skip to content

test(config): flag/env/file precedence via the real binary #153

Description

@btwshivam

viper precedence (flag > KERNO_* env > /etc/kerno/config.yaml > default) is only unit-tested in pieces, and #112 shows the env tier is currently broken in a way unit tests didn't catch. nothing exercises the real loading path: file discovery in /etc/kerno, the KERNO_ env prefix, and flag override, all together.

propose: an integration test that runs the built binary in a container with a mounted /etc/kerno/config.yaml, sets KERNO_* env vars, and passes flags, then asserts the effective config resolves in the documented order. drive it through a command that prints or acts on the resolved config. this is the test that would have caught #112.

depends on the harness (#143), and should be added alongside or after the #112 fix so it locks the behavior in.

Metadata

Metadata

Assignees

Labels

claimedSomeone is actively working on this (auto-released after 10d inactivity)testingTests and test coverage

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions