(t *testing.T, schemaStr string)
| 148 | } |
| 149 | |
| 150 | func 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 | |
| 163 | func TestVectorSchema(t *testing.T) { |
| 164 | dg := initClusterTest(t, ` |
no test coverage detected