mirror of
https://github.com/alice-lg/alice-lg.git
synced 2024-05-11 05:55:03 +00:00
29 lines
537 B
Go
29 lines
537 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
// Test configuration loading and parsing
|
|
// using the default config
|
|
|
|
func TestLoadConfigs(t *testing.T) {
|
|
|
|
config, err := loadConfig("../etc/alicelg/alice.example.conf")
|
|
if err != nil {
|
|
t.Error("Could not load test config:", err)
|
|
}
|
|
|
|
if config.Server.Listen == "" {
|
|
t.Error("Listen string not present.")
|
|
}
|
|
|
|
if len(config.Ui.RoutesColumns) == 0 {
|
|
t.Error("Route columns settings missing")
|
|
}
|
|
|
|
if len(config.Ui.RoutesRejections.Reasons) == 0 {
|
|
t.Error("Rejection reasons missing")
|
|
}
|
|
}
|