pkg/index: correct test for unindexed attribute

Fixes #1199

Change-Id: I294bd6f09aef1ea50dda7e20038aee7993ffd181
This commit is contained in:
Euan Kemp 2018-07-26 11:15:47 -07:00
parent 62ec6f94b0
commit d456c989b1
1 changed files with 2 additions and 11 deletions

View File

@ -567,17 +567,8 @@ func Index(t *testing.T, initIdx func() *index.Index) {
Attribute: "unindexed",
}
err := id.Index.SearchPermanodesWithAttr(ctx, ch, req)
if err != nil {
t.Fatalf("SearchPermanodesWithAttr = %v", err)
}
var got []blob.Ref
for r := range ch {
got = append(got, r)
}
want := []blob.Ref{}
if len(got) != len(want) {
t.Errorf("SearchPermanodesWithAttr results differ.\n got: %q\nwant: %q",
got, want)
if err == nil {
t.Fatalf("SearchPermanodesWithAttr with unindexed attribute should return an error")
}
}