0
0
Fork 0

add ability for integration test to check hit locations

This commit is contained in:
Marty Schoch 2015-12-21 14:42:43 -05:00
parent f7698f1f15
commit 7bb58e1be4
1 changed files with 5 additions and 0 deletions

View File

@ -178,6 +178,11 @@ func runTestDir(t *testing.T, dir, datasetName string) {
t.Errorf("test %d - expected hit %d to have fragments %#v got %#v", testNum, hi, hit.Fragments, res.Hits[hi].Fragments)
}
}
if hit.Locations != nil {
if !reflect.DeepEqual(hit.Locations, res.Hits[hi].Locations) {
t.Errorf("test %d - expected hit %d to have locations %v got %v", testNum, hi, hit.Locations, res.Hits[hi].Locations)
}
}
}
if search.Result.Facets != nil {
if !reflect.DeepEqual(search.Result.Facets, res.Facets) {