test(config): subsonic env override

This commit is contained in:
2026-04-19 17:39:48 +00:00
parent e649ad2f66
commit f8b0d78544
+11
View File
@@ -117,6 +117,17 @@ func TestLibraryEnvOverrides(t *testing.T) {
}
}
func TestSubsonicEnvOverride(t *testing.T) {
t.Setenv("SMARTMUSIC_SUBSONIC_ALLOW_PLAINTEXT_PASSWORD", "true")
cfg, err := Load("")
if err != nil {
t.Fatalf("Load: %v", err)
}
if !cfg.Subsonic.AllowPlaintextPassword {
t.Error("allow_plaintext_password = false, want true")
}
}
func TestLibraryYAMLLoads(t *testing.T) {
dir := t.TempDir()
path := filepath.Join(dir, "config.yaml")