MCPcopy
hub / github.com/dgraph-io/dgraph / initClusterTest

Function initClusterTest

worker/worker_test.go:150–161  ·  view source on GitHub ↗
(t *testing.T, schemaStr string)

Source from the content-addressed store, hash-verified

148}
149
150func initClusterTest(t *testing.T, schemaStr string) *dgo.Dgraph {
151 dg, err := testutil.DgraphClient(testutil.GetSockAddr())
152 if err != nil {
153 t.Fatalf("Error while getting a dgraph client: %v", err)
154 }
155 testutil.DropAll(t, dg)
156
157 require.NoError(t, dg.Alter(context.Background(), &api.Operation{Schema: schemaStr}))
158 populateClusterGraph(t, dg)
159
160 return dg
161}
162
163func TestVectorSchema(t *testing.T) {
164 dg := initClusterTest(t, `

Callers 4

TestVectorSchemaFunction · 0.85
TestProcessTaskFunction · 0.85
TestProcessTaskIndexFunction · 0.85

Calls 6

DgraphClientFunction · 0.92
GetSockAddrFunction · 0.92
DropAllFunction · 0.92
populateClusterGraphFunction · 0.85
FatalfMethod · 0.80
AlterMethod · 0.80

Tested by

no test coverage detected