(t *testing.T, triple string, pred string)
| 150 | } |
| 151 | } |
| 152 | func updateVector(t *testing.T, triple string, pred string) []float32 { |
| 153 | uid := strings.Split(triple, " ")[0] |
| 154 | randomVec := generateRandomVector(10) |
| 155 | updatedTriple := fmt.Sprintf("%s <%s> \"%v\" .", uid, pred, randomVec) |
| 156 | require.NoError(t, addTriplesToCluster(updatedTriple)) |
| 157 | |
| 158 | updatedVec, err := queryVectorUsingUid(t, uid, pred) |
| 159 | require.NoError(t, err) |
| 160 | require.Equal(t, randomVec, updatedVec) |
| 161 | return updatedVec |
| 162 | } |
| 163 | |
| 164 | func queryVectorUsingUid(t *testing.T, uid, pred string) ([]float32, error) { |
| 165 | vectorQuery := fmt.Sprintf(` |
no test coverage detected