author | Alberto Bertogli
<albertito@blitiri.com.ar> 2025-03-29 19:27:18 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2025-03-29 19:28:01 UTC |
parent | 399f0c291825d35bacf25b7ee8a455934dc6d03c |
config/config_test.go | +14 | -0 |
diff --git a/config/config_test.go b/config/config_test.go index 8b564e1..e9d7d02 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -112,6 +112,20 @@ https: } } +func TestExampleConfig(t *testing.T) { + // Test that we can load the included example config. + c, err := Load("gofer.yaml") + if err != nil { + t.Fatalf("error loading example config: %v", err) + } + + if errs := c.Check(); len(errs) > 0 { + t.Errorf("errors in example config: %v", errs) + } + + t.Logf("config: %v", c) +} + func TestCheck(t *testing.T) { // routes must be set. contents := `