refactor(config): удалена опция opencode.config (OPENCODE_CONFIG)
This commit is contained in:
@@ -146,26 +146,6 @@ log:
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoad_EnvOverride(t *testing.T) {
|
||||
t.Setenv("TG_TOKEN", "tok")
|
||||
t.Setenv("TG_CHAT_ID", "42")
|
||||
// env override для opencode.timeout
|
||||
t.Setenv("OPENCODE_CONFIG", "/custom/opencode.json")
|
||||
|
||||
yaml := `telegram:
|
||||
token: "${TG_TOKEN}"
|
||||
chat_id: "${TG_CHAT_ID}"
|
||||
`
|
||||
path := writeCfg(t, yaml)
|
||||
cfg, err := Load(path)
|
||||
if err != nil {
|
||||
t.Fatalf("Load: %v", err)
|
||||
}
|
||||
if cfg.OpenCode.Config != "/custom/opencode.json" {
|
||||
t.Errorf("opencode config = %q", cfg.OpenCode.Config)
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoad_MissingEnvVarUsesDefault(t *testing.T) {
|
||||
t.Setenv("TG_TOKEN", "tok")
|
||||
t.Setenv("TG_CHAT_ID", "42")
|
||||
|
||||
Reference in New Issue
Block a user