(t *testing.T)
| 31 | } |
| 32 | |
| 33 | func TestGetConfigValue(t *testing.T) { |
| 34 | cfg, err := NewConfigFromFile("../fixtures/exampleConfig.ini") |
| 35 | |
| 36 | require.Equal(t, nil, err, "Parsing of the fixture config file should have worked.") |
| 37 | |
| 38 | format, err := cfg.GetConfigValue("format") |
| 39 | |
| 40 | require.Equal(t, nil, err, "Getting a default format config value should have worked.") |
| 41 | |
| 42 | assert.Equal(t, "{{.LineNumber}}:{{.Rule}}:{{.Violation}}", format) |
| 43 | } |
| 44 | |
| 45 | func TestGetConfigValueOnMissingConfigFile(t *testing.T) { |
| 46 | cfg, err := NewConfigFromFile("../fixtures/idontexist.ini") |
nothing calls this directly
no test coverage detected