From e52647a14bea3af401aad0d2e95f9ea4ee9ffb42 Mon Sep 17 00:00:00 2001 From: Matthias Hannig Date: Mon, 22 May 2017 11:13:36 +0200 Subject: [PATCH] improved config test --- backend/config_test.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/backend/config_test.go b/backend/config_test.go index 38ae53d..cb3438c 100644 --- a/backend/config_test.go +++ b/backend/config_test.go @@ -9,10 +9,20 @@ import ( func TestLoadConfigs(t *testing.T) { - config, err := loadConfigs("../etc/alicelg/alice.conf", "", "") + config, err := loadConfig("../etc/alicelg/alice.conf") if err != nil { t.Error("Could not load test config:", err) } - t.Log(config) + 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") + } }