Fix config for automated tests

This commit is contained in:
2026-03-04 15:28:43 +01:00
parent 60c8f37257
commit 2d97aa85c4
2 changed files with 15 additions and 1 deletions

View File

@@ -111,3 +111,17 @@ func LoadConfig() Config {
return cfg.ConfigFile
}
// used for testing
func LoadConfigFromFile(configPath string) Config {
f, err := os.ReadFile(configPath)
if err != nil {
log.Fatal(err)
}
var config Config
err = toml.Unmarshal(f, &config)
if err != nil {
panic(err)
}
return config
}