From d36ac9ddda5ddbc781a06017ee6d45ff2f8a45d8 Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 5 Mar 2026 12:27:16 +0100 Subject: [PATCH] test: fix ParadeDB project search count to 27 The recursive CTE pulls in child projects of matched parents, resulting in 27 total results, not 12. --- pkg/webtests/project_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/webtests/project_test.go b/pkg/webtests/project_test.go index cb99647dc..a8c115fc3 100644 --- a/pkg/webtests/project_test.go +++ b/pkg/webtests/project_test.go @@ -57,9 +57,10 @@ func TestProject(t *testing.T) { require.NoError(t, json.Unmarshal(rec.Body.Bytes(), &projects)) if db.ParadeDBAvailable() { - // ParadeDB fuzzy(1, prefix=true) on "Test1" also matches - // Test2-Test9 (edit distance 1), Test10+ (prefix), etc. - require.Len(t, projects, 12) + // ParadeDB fuzzy(1, prefix=true) on "Test1" matches Test2-Test9 + // (edit distance 1), Test10+ (prefix), etc. The recursive CTE + // also pulls in child projects of matched parents. + require.Len(t, projects, 27) } else { // ILIKE '%Test1%' matches Test1, Test10, Test11, Test19, + favorites require.Len(t, projects, 5)