MCPcopy Create free account
hub / github.com/cloudwan/gohan / testFileUtil

Function testFileUtil

util/util_test.go:74–84  ·  view source on GitHub ↗
(file string)

Source from the content-addressed store, hash-verified

72})
73
74func testFileUtil(file string) {
75 os.Remove(file)
76 data := map[string]interface{}{
77 "test": "data",
78 }
79 Expect(SaveFile(file, data)).To(Succeed())
80 defer os.Remove(file)
81 loadedData, err := LoadMap(file)
82 Expect(err).ToNot(HaveOccurred())
83 Expect(loadedData["test"]).To(Equal(data["test"]))
84}

Callers 1

util_test.goFile · 0.85

Calls 2

SaveFileFunction · 0.85
LoadMapFunction · 0.85

Tested by

no test coverage detected