Skip to content

Commit

Permalink
pkg/index: correct test for unindexed attribute
Browse files Browse the repository at this point in the history
Fixes perkeep#1199

Change-Id: I294bd6f09aef1ea50dda7e20038aee7993ffd181
  • Loading branch information
euank committed Jul 26, 2018
1 parent 62ec6f9 commit d456c98
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions pkg/index/indextest/tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

Expand Down

0 comments on commit d456c98

Please sign in to comment.