Skip to content

Commit da49e35

Browse files
committed
test: update tests for config changes
1 parent 33e18d1 commit da49e35

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

test/config/config_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ func TestLoadNonExistent(t *testing.T) {
6767
}
6868

6969
func TestLoadValidConfig(t *testing.T) {
70+
// Clear env vars that could override config
71+
t.Setenv("OPENAI_API_KEY", "")
72+
t.Setenv("OPENAI_BASE_URL", "")
73+
t.Setenv("OPENAI_MODEL", "")
74+
7075
// Create a temporary config file
7176
tmpDir := t.TempDir()
7277
configPath := filepath.Join(tmpDir, "config.toml")
@@ -144,6 +149,11 @@ func TestLoadInvalidTOML(t *testing.T) {
144149
}
145150

146151
func TestLoadPartialConfig(t *testing.T) {
152+
// Clear env vars that could override config
153+
t.Setenv("OPENAI_API_KEY", "")
154+
t.Setenv("OPENAI_BASE_URL", "")
155+
t.Setenv("OPENAI_MODEL", "")
156+
147157
// Partial config should merge with defaults
148158
tmpDir := t.TempDir()
149159
configPath := filepath.Join(tmpDir, "config.toml")

0 commit comments

Comments
 (0)