refactor(config): удалена опция opencode.config (OPENCODE_CONFIG)
Some checks failed
CI / test (push) Failing after 1m20s
CI / build-and-package (amd64, linux) (push) Failing after 1m4s
CI / build-and-package (amd64, windows) (push) Successful in 30s

This commit is contained in:
ki.sagidullin
2026-08-23 18:18:25 +05:00
parent 8c91c83024
commit 3c51ffee4e
6 changed files with 1 additions and 33 deletions

View File

@@ -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")