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

Function TestVectorSchema

worker/worker_test.go:163–172  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

161}
162
163func TestVectorSchema(t *testing.T) {
164 dg := initClusterTest(t, `
165 neighbour: [uid] .
166 vectortest: float32vector @index(hnsw(metric: "euclidean")) .`)
167
168 resp, err := testutil.RetryQuery(dg, "schema {}")
169 require.NoError(t, err)
170
171 x.AssertTrue(strings.Contains(string(resp.Json), `{"predicate":"vectortest","type":"float32vector","tokenizer":["hnsw(\"metric\":\"euclidean\")"],"index_specs":[{"name":"hnsw","options":[{"key":"metric","value":"euclidean"}]}]}]`))
172}
173
174func TestProcessTask(t *testing.T) {
175 dg := initClusterTest(t, `neighbour: [uid] .`)

Callers

nothing calls this directly

Calls 3

RetryQueryFunction · 0.92
AssertTrueFunction · 0.92
initClusterTestFunction · 0.85

Tested by

no test coverage detected