Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Test(handler): fix failing TestSearchHandlerUpdateRejectsInvalidSearchID assertion (#17622)

Jack08666560b5a7
diff --git a/internal/handler/search_handler_test.go b/internal/handler/search_handler_test.go
index 8ae0f19201..e6805281ff 100644
--- a/internal/handler/search_handler_test.go
+++ b/internal/handler/search_handler_test.go
@@ -94,7 +94,7 @@ func TestSearchHandlerUpdateRejectsInvalidSearchID(t *testing.T) {
if resp["code"] != float64(common.CodeAuthenticationError) {
t.Fatalf("expected code 109, got %v", resp["code"])
}
- if !strings.Contains(resp["message"].(string), "no authorization") {
+ if !strings.Contains(strings.ToLower(resp["message"].(string)), "no authorization") {
t.Fatalf("expected 'no authorization' in message, got %v", resp["message"])
}
}