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

Function TestMain

query/cloud_test.go:20–36  ·  view source on GitHub ↗
(m *testing.M)

Source from the content-addressed store, hash-verified

18)
19
20func TestMain(m *testing.M) {
21 c, err := dgraphtest.NewDCloudCluster()
22 x.Panic(err)
23
24 dg, cleanup, err := c.Client()
25 x.Panic(err)
26 defer cleanup()
27
28 ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
29 defer cancel()
30 x.Panic(dg.LoginIntoNamespace(ctx, dgraphapi.DefaultUser, dgraphapi.DefaultPassword, x.RootNamespace))
31
32 dc = c
33 client.Dgraph = dg
34 populateCluster(dc)
35 m.Run()
36}

Callers

nothing calls this directly

Calls 7

ClientMethod · 0.95
NewDCloudClusterFunction · 0.92
PanicFunction · 0.92
cleanupFunction · 0.85
LoginIntoNamespaceMethod · 0.80
populateClusterFunction · 0.70
RunMethod · 0.45

Tested by

no test coverage detected