package internal import ( "fmt" "testing" ) func TestConfigMissingFields(t *testing.T) { config := &Config{} err := validateConfig(config) if err == nil { t.Error("err should not have been nil") } t.Log("error successfully caught") t.Log(err) } func TestConfigPass(t *testing.T) { config, err := NewConfigFromPath("testdata/goodconfig.yaml") if err != nil { t.Error(err) } fmt.Printf("%+v", config) }