From 87b1f6f6309341efedf0c6aed17e0e6132481da4 Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Wed, 22 Apr 2026 09:51:37 +0200 Subject: [PATCH] test(search): cover audio.artist instead of Title for case preservation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The FIXME pointed at #2632 (dotted keys in KQL property restrictions), which is now merged. Use audio.artist — the originally intended target field for this regression — so the test matches its name: a nested string field that is not on the lowercase allowlist. --- services/search/pkg/bleve/backend_test.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/services/search/pkg/bleve/backend_test.go b/services/search/pkg/bleve/backend_test.go index c85f63fb1d..8ecfa4bbbd 100644 --- a/services/search/pkg/bleve/backend_test.go +++ b/services/search/pkg/bleve/backend_test.go @@ -138,16 +138,15 @@ var _ = Describe("Bleve", func() { assertDocCount(rootResource.ID, "Size:>100000", 0) }) - // FIXME: switch Title to audio.artist once - // https://github.com/opencloud-eu/opencloud/pull/2632 lands - // (KQL grammar then accepts dotted keys). It("preserves value case for fields not explicitly marked lowercase", func() { - parentResource.Document.Title = "Some Title" + parentResource.Document.Audio = &libregraph.Audio{ + Artist: libregraph.PtrString("Some Artist"), + } err := eng.Upsert(parentResource.ID, parentResource) Expect(err).ToNot(HaveOccurred()) - assertDocCount(rootResource.ID, `Title:"Some Title"`, 1) - assertDocCount(rootResource.ID, `Title:"some title"`, 0) + assertDocCount(rootResource.ID, `audio.artist:"Some Artist"`, 1) + assertDocCount(rootResource.ID, `audio.artist:"some artist"`, 0) }) })