MCPcopy Index your code
hub / github.com/perkeep/perkeep / canonicalizeGolden

Function canonicalizeGolden

pkg/serverinit/serverinit_test.go:236–247  ·  view source on GitHub ↗
(t *testing.T, v []byte)

Source from the content-addressed store, hash-verified

234}
235
236func canonicalizeGolden(t *testing.T, v []byte) []byte {
237 localPath, err := filepath.Abs(relativeRing)
238 if err != nil {
239 t.Fatal(err)
240 }
241 // twice: once in search owner, and once in sighelper.
242 v = bytes.Replace(v, []byte(localPath), []byte(secringPlaceholder), 2)
243 if !bytes.HasSuffix(v, []byte("\n")) {
244 v = append(v, '\n')
245 }
246 return v
247}
248
249func TestExpansionsInHighlevelConfig(t *testing.T) {
250 srcRoot, err := osutil.PkSourceRoot()

Callers 1

testConfigFunction · 0.85

Calls 1

FatalMethod · 0.80

Tested by

no test coverage detected