MCPcopy Create free account
hub / github.com/DoNewsCode/core / TestKoanfAdapter_Reload

Function TestKoanfAdapter_Reload

config/config_test.go:188–197  ·  view source on GitHub ↗
(t *gotesting.T)

Source from the content-addressed store, hash-verified

186}
187
188func TestKoanfAdapter_Reload(t *gotesting.T) {
189 t.Parallel()
190 conf, err := NewConfig(
191 WithValidators(func(data map[string]interface{}) error {
192 return errors.New("bad config")
193 }),
194 )
195 assert.Error(t, err)
196 assert.Nil(t, conf)
197}
198
199func TestUpgrade(t *gotesting.T) {
200 var m MapAdapter = map[string]interface{}{"foo": "bar"}

Callers

nothing calls this directly

Calls 3

NewConfigFunction · 0.85
WithValidatorsFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected