mirror of https://github.com/perkeep/perkeep.git
pkg/index: correct test for unindexed attribute
Fixes #1199 Change-Id: I294bd6f09aef1ea50dda7e20038aee7993ffd181
This commit is contained in:
parent
62ec6f94b0
commit
d456c989b1
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue