Fix more index tests

This commit is contained in:
Benedikt Kulmann
2020-10-16 09:57:08 +02:00
parent 37d7daf098
commit 9dbf77fad1
2 changed files with 2 additions and 6 deletions

View File

@@ -52,9 +52,10 @@ func TestNonUniqueIndexDelete(t *testing.T) {
sut, dataPath := getNonUniqueIdxSut(t, Pet{}, "Color")
assert.FileExists(t, path.Join(dataPath, fmt.Sprintf("index.disk/non_unique.%v.Color/Green/goefe-789", GetTypeFQN(Pet{}))))
err := sut.Remove("goefe-789", "")
err := sut.Remove("goefe-789", "Green")
assert.NoError(t, err)
assert.NoFileExists(t, path.Join(dataPath, fmt.Sprintf("index.disk/non_unique.%v.Color/Green/goefe-789", GetTypeFQN(Pet{}))))
assert.FileExists(t, path.Join(dataPath, fmt.Sprintf("index.disk/non_unique.%v.Color/Green/xadaf-189", GetTypeFQN(Pet{}))))
_ = os.RemoveAll(dataPath)
}

View File

@@ -52,10 +52,6 @@ func (s Service) deflateMembers(g *proto.Group) {
// ListGroups implements the GroupsServiceHandler interface
func (s Service) ListGroups(c context.Context, in *proto.ListGroupsRequest, out *proto.ListGroupsResponse) (err error) {
var searchResults []string
if err != nil {
s.log.Error().Err(err).Msg("could not execute bleve search")
return merrors.InternalServerError(s.id, "could not execute bleve search: %v", err.Error())
}
out.Groups = make([]*proto.Group, 0)
if in.Query == "" {
@@ -68,7 +64,6 @@ func (s Service) ListGroups(c context.Context, in *proto.ListGroupsRequest, out
if len(match) == 2 {
searchResults = []string{match[1]}
}
*/
for _, hit := range searchResults {