Skip to content

Comments

fix(test): make sure tests aren't impacted by user config#51

Merged
setrofim merged 2 commits intomainfrom
fix
Feb 19, 2026
Merged

fix(test): make sure tests aren't impacted by user config#51
setrofim merged 2 commits intomainfrom
fix

Conversation

@setrofim
Copy link
Contributor

Modify readConfig to check whether running inside a test, and if so, to not process the user config file (~/.config/cocli/config.yaml) or the environment variables.

The config file passed with --config will still be processed in case a test wants provide one.

Copy link
Contributor

@thomas-fossati thomas-fossati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

(note: the test coverage workflow currently fails.)

Modify readConfig to check whether running inside a test, and if so, to
not process the user config file (~/.config/cocli/config.yaml) or the
environment variables.

The config file passed with --config will still be processed in case
a test wants provide one.

Signed-off-by: setrofim <setrofim@gmail.com>
This gets generated by tests.

Signed-off-by: setrofim <setrofim@gmail.com>
@setrofim setrofim merged commit a9be394 into main Feb 19, 2026
13 checks passed
@setrofim setrofim deleted the fix branch February 19, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants