(m *testing.M)
| 18 | ) |
| 19 | |
| 20 | func 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 | } |
nothing calls this directly
no test coverage detected