MCPcopy Create free account
hub / github.com/checkmake/checkmake / TestGetConfigValue

Function TestGetConfigValue

config/config_test.go:33–43  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

31}
32
33func 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
45func TestGetConfigValueOnMissingConfigFile(t *testing.T) {
46 cfg, err := NewConfigFromFile("../fixtures/idontexist.ini")

Callers

nothing calls this directly

Calls 2

NewConfigFromFileFunction · 0.85
GetConfigValueMethod · 0.80

Tested by

no test coverage detected