From 660117ed9fc1c13f6ea6813a72c618d1b3eee389 Mon Sep 17 00:00:00 2001 From: perf3ct Date: Sat, 28 Jun 2025 22:54:41 +0000 Subject: [PATCH] fix(tests): fix failing integration tests, again --- tests/integration_failed_ocr_endpoints_tests.rs | 4 +++- tests/integration_ocr_failure_counting_tests.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/integration_failed_ocr_endpoints_tests.rs b/tests/integration_failed_ocr_endpoints_tests.rs index c70bf03..bd6dba9 100644 --- a/tests/integration_failed_ocr_endpoints_tests.rs +++ b/tests/integration_failed_ocr_endpoints_tests.rs @@ -144,7 +144,7 @@ impl FailedOcrTestClient { /// Get failed OCR documents async fn get_failed_ocr_documents(&self, limit: Option, offset: Option) -> Result> { - let mut url = format!("{}/api/documents/failed-ocr", get_base_url()); + let mut url = format!("{}/api/documents/failed", get_base_url()); let mut params = Vec::new(); if let Some(l) = limit { @@ -153,6 +153,8 @@ impl FailedOcrTestClient { if let Some(o) = offset { params.push(format!("offset={}", o)); } + // Filter to only OCR failures since this is the OCR-specific test + params.push("stage=ocr".to_string()); if !params.is_empty() { url.push_str(&format!("?{}", params.join("&"))); diff --git a/tests/integration_ocr_failure_counting_tests.rs b/tests/integration_ocr_failure_counting_tests.rs index 2bc8bd1..7e32d23 100644 --- a/tests/integration_ocr_failure_counting_tests.rs +++ b/tests/integration_ocr_failure_counting_tests.rs @@ -115,7 +115,7 @@ impl OcrFailureCountingTestClient { /// Get failed OCR documents and statistics async fn get_failed_ocr_documents(&self) -> Result> { let response = self.client - .get(&format!("{}/api/documents/failed-ocr", get_base_url())) + .get(&format!("{}/api/documents/failed?stage=ocr", get_base_url())) .header("Authorization", self.get_auth_header()) .timeout(TIMEOUT) .send()