MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / createTestCoverageFile

Function createTestCoverageFile

t/t.go:1321–1339  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

1319}
1320
1321func createTestCoverageFile(path string) error {
1322 outFile, err := os.Create(path)
1323 if err != nil {
1324 return err
1325 }
1326 defer func() {
1327 if err := outFile.Close(); err != nil {
1328 glog.Warningf("error closing file: %v", err)
1329 }
1330 }()
1331
1332 cmd := command("echo", coverageFileHeader)
1333 cmd.Stdout = outFile
1334 if err := cmd.Run(); err != nil {
1335 return err
1336 }
1337
1338 return nil
1339}
1340
1341func fileExists(path string) bool {
1342 fi, err := os.Stat(path)

Callers 1

executePreRunStepsFunction · 0.85

Calls 5

WarningfMethod · 0.80
commandFunction · 0.70
CreateMethod · 0.65
CloseMethod · 0.65
RunMethod · 0.45

Tested by

no test coverage detected