(t *testing.T)
| 619 | } |
| 620 | |
| 621 | func TestVectorMutationWithoutIndex(t *testing.T) { |
| 622 | dropPredicate("vtest") |
| 623 | |
| 624 | pred := "vtest" |
| 625 | setSchema(fmt.Sprintf(vectorSchemaWithoutIndex, pred)) |
| 626 | |
| 627 | numVectors := 1000 |
| 628 | vectorSize := 4 |
| 629 | |
| 630 | randomVectors, _ := generateRandomVectors(numVectors, vectorSize, pred) |
| 631 | require.NoError(t, addTriplesToCluster(randomVectors)) |
| 632 | |
| 633 | query := `{ |
| 634 | vector(func: has(vtest)) { |
| 635 | count(uid) |
| 636 | } |
| 637 | }` |
| 638 | |
| 639 | result := processQueryNoErr(t, query) |
| 640 | require.JSONEq(t, fmt.Sprintf(`{"data": {"vector":[{"count":%d}]}}`, numVectors), result) |
| 641 | |
| 642 | dropPredicate("vtest") |
| 643 | |
| 644 | pred = "vtest2" |
| 645 | setSchema(fmt.Sprintf(vectorSchemaWithoutIndex, pred)) |
| 646 | |
| 647 | randomVectors, _ = generateRandomVectors(numVectors, vectorSize, pred) |
| 648 | require.NoError(t, addTriplesToCluster(randomVectors)) |
| 649 | |
| 650 | query = `{ |
| 651 | vector(func: has(vtest2)) { |
| 652 | count(uid) |
| 653 | } |
| 654 | }` |
| 655 | |
| 656 | result = processQueryNoErr(t, query) |
| 657 | require.JSONEq(t, fmt.Sprintf(`{"data": {"vector":[{"count":%d}]}}`, numVectors), result) |
| 658 | dropPredicate("vtest2") |
| 659 | } |
| 660 | |
| 661 | func TestVectorDelete(t *testing.T) { |
| 662 | pred := "vtest" |
nothing calls this directly
no test coverage detected