fix: clear env vars in TestLoadFromFile to test pure config values
The sandbox had BRAVE_API_KEY set, causing the env override to win over the config file value in the test assertion.
This commit is contained in:
parent
8649864971
commit
5181073a95
4 changed files with 14 additions and 1 deletions
|
|
@ -20,6 +20,14 @@ func TestLoadDefaults(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestLoadFromFile(t *testing.T) {
|
||||
// Clear env vars so we test pure config file values
|
||||
t.Setenv("PORT", "")
|
||||
t.Setenv("HTTP_TIMEOUT", "")
|
||||
t.Setenv("UPSTREAM_SEARXNG_URL", "")
|
||||
t.Setenv("LOCAL_PORTED_ENGINES", "")
|
||||
t.Setenv("BRAVE_API_KEY", "")
|
||||
t.Setenv("BRAVE_ACCESS_TOKEN", "")
|
||||
|
||||
dir := t.TempDir()
|
||||
path := filepath.Join(dir, "config.toml")
|
||||
content := `
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue