MCPcopy Create free account
hub / github.com/unknwon/goconfig / TestSaveConfigData

Function TestSaveConfigData

goconfig_test.go:209–220  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

207}
208
209func TestSaveConfigData(t *testing.T) {
210 Convey("Save a ConfigFile to file system", t, func() {
211 c, err := LoadConfigFile("testdata/conf.ini", "testdata/conf2.ini")
212 So(err, ShouldBeNil)
213 So(c, ShouldNotBeNil)
214
215 c.SetValue("", "", "empty")
216 var dst bytes.Buffer
217 So(SaveConfigData(c, &dst), ShouldBeNil)
218 So(dst.Len(), ShouldNotEqual, 0)
219 })
220}
221
222func TestReload(t *testing.T) {
223 Convey("Reload a configuration file", t, func() {

Callers

nothing calls this directly

Calls 3

LoadConfigFileFunction · 0.85
SaveConfigDataFunction · 0.85
SetValueMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…