test(config): subsonic env override
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user