MCPcopy Create free account
hub / github.com/dgraph-io/dgraph / TestMain

Function TestMain

schema/parse_test.go:679–691  ·  view source on GitHub ↗
(m *testing.M)

Source from the content-addressed store, hash-verified

677var ps *badger.DB
678
679func TestMain(m *testing.M) {
680 dir, err := os.MkdirTemp("", "storetest_")
681 x.Panic(err)
682 defer os.RemoveAll(dir)
683
684 kvOpt := badger.DefaultOptions(dir)
685 ps, err = badger.OpenManaged(kvOpt)
686 x.Panic(err)
687 defer ps.Close()
688
689 Init(ps)
690 m.Run()
691}

Callers

nothing calls this directly

Calls 5

PanicFunction · 0.92
RemoveAllMethod · 0.80
InitFunction · 0.70
CloseMethod · 0.65
RunMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…