(t *testing.T)
| 280 | } |
| 281 | |
| 282 | func TestVectorIndexOnVectorPredWithoutData(t *testing.T) { |
| 283 | conf := dgraphtest.NewClusterConfig().WithNumAlphas(1).WithNumZeros(1).WithReplicas(1).WithACL(time.Hour) |
| 284 | c, err := dgraphtest.NewLocalCluster(conf) |
| 285 | require.NoError(t, err) |
| 286 | defer func() { c.Cleanup(t.Failed()) }() |
| 287 | require.NoError(t, c.Start()) |
| 288 | |
| 289 | gc, cleanup, err := c.Client() |
| 290 | require.NoError(t, err) |
| 291 | defer cleanup() |
| 292 | require.NoError(t, gc.LoginIntoNamespace(context.Background(), |
| 293 | dgraphapi.DefaultUser, dgraphapi.DefaultPassword, x.RootNamespace)) |
| 294 | |
| 295 | hc, err := c.HTTPClient() |
| 296 | require.NoError(t, err) |
| 297 | require.NoError(t, hc.LoginIntoNamespace(dgraphapi.DefaultUser, |
| 298 | dgraphapi.DefaultPassword, x.RootNamespace)) |
| 299 | |
| 300 | require.NoError(t, gc.SetupSchema(testSchema)) |
| 301 | |
| 302 | vector := []float32{1.0, 2.0, 3.0} |
| 303 | _, err = gc.QueryMultipleVectorsUsingSimilarTo(vector, pred, 10) |
| 304 | require.NoError(t, err) |
| 305 | } |
| 306 | |
| 307 | func TestVectorIndexDropPredicate(t *testing.T) { |
| 308 | conf := dgraphtest.NewClusterConfig().WithNumAlphas(1).WithNumZeros(1).WithReplicas(1).WithACL(time.Hour) |
nothing calls this directly
no test coverage detected