fix: acceptance tests to include path resource

This commit is contained in:
Florian Schade
2023-09-01 12:07:47 +02:00
committed by jkoberg
parent af9556f8f1
commit a0f2adedb5
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -177,10 +177,10 @@ func (b *Bleve) Search(_ context.Context, sir *searchService.SearchIndexRequest)
if sir.Ref != nil {
hitPath := strings.TrimSuffix(getFieldValue[string](hit.Fields, "Path"), "/")
sirPath := utils.MakeRelativePath(sir.Ref.Path)
isMountPoint := hitPath == sirPath
requestedPath := utils.MakeRelativePath(sir.Ref.Path)
isPathRoot := hitPath == requestedPath
if !isMountPoint && sirPath != "." && !strings.HasPrefix(hitPath, sirPath+"/") {
if !isPathRoot && requestedPath != "." && !strings.HasPrefix(hitPath, requestedPath+"/") {
totalMatches--
continue
}