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

Function TestGetMissingConfigValue

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

Source from the content-addressed store, hash-verified

56}
57
58func TestGetMissingConfigValue(t *testing.T) {
59 cfg, err := NewConfigFromFile("../fixtures/exampleConfig.ini")
60
61 require.Equal(t, nil, err, "Parsing of the fixture config file should have worked.")
62
63 format, err := cfg.GetConfigValue("nothinghere")
64
65 assert.NotEqual(t, nil, err)
66 assert.Equal(t, "", format)
67 assert.Equal(t, "key 'nothinghere' doesn't exist in config", err.Error())
68}
69
70func TestGetConfigValueOnMissingDefaultSection(t *testing.T) {
71 cfg, err := NewConfigFromFile("../fixtures/exampleConfigNoDefault.ini")

Callers

nothing calls this directly

Calls 2

NewConfigFromFileFunction · 0.85
GetConfigValueMethod · 0.80

Tested by

no test coverage detected