From ae33b25133c3141c96eb545b3f4474b966a9a704 Mon Sep 17 00:00:00 2001 From: perf3ct Date: Wed, 2 Jul 2025 19:16:13 +0000 Subject: [PATCH] feat(tests): fix ocr_retry issues in tests --- tests/integration_document_upload_hash_duplicate_tests.rs | 2 ++ tests/integration_hash_duplicate_detection_tests.rs | 2 ++ tests/integration_ignored_files_integration_tests.rs | 2 ++ tests/integration_source_sync_hash_duplicate_tests.rs | 2 ++ tests/integration_webdav_hash_duplicate_tests.rs | 2 ++ tests/unit_unit_tests.rs | 4 ++++ 6 files changed, 14 insertions(+) diff --git a/tests/integration_document_upload_hash_duplicate_tests.rs b/tests/integration_document_upload_hash_duplicate_tests.rs index e387deb..80974a3 100644 --- a/tests/integration_document_upload_hash_duplicate_tests.rs +++ b/tests/integration_document_upload_hash_duplicate_tests.rs @@ -36,6 +36,8 @@ fn create_test_document(user_id: Uuid, filename: &str, file_hash: String) -> Doc ocr_status: Some("pending".to_string()), ocr_error: None, ocr_completed_at: None, + ocr_retry_count: None, + ocr_failure_reason: None, tags: Vec::new(), created_at: Utc::now(), updated_at: Utc::now(), diff --git a/tests/integration_hash_duplicate_detection_tests.rs b/tests/integration_hash_duplicate_detection_tests.rs index 9442235..1b4db3f 100644 --- a/tests/integration_hash_duplicate_detection_tests.rs +++ b/tests/integration_hash_duplicate_detection_tests.rs @@ -54,6 +54,8 @@ fn create_test_document(user_id: Uuid, filename: &str, file_hash: Option ocr_status: Some("pending".to_string()), ocr_error: None, ocr_completed_at: None, + ocr_retry_count: None, + ocr_failure_reason: None, tags: Vec::new(), created_at: Utc::now(), updated_at: Utc::now(), diff --git a/tests/integration_ignored_files_integration_tests.rs b/tests/integration_ignored_files_integration_tests.rs index 085ce53..e37c95c 100644 --- a/tests/integration_ignored_files_integration_tests.rs +++ b/tests/integration_ignored_files_integration_tests.rs @@ -351,6 +351,8 @@ async fn test_create_ignored_file_from_document() -> Result<()> { ocr_status: Some("completed".to_string()), ocr_error: None, ocr_completed_at: Some(chrono::Utc::now()), + ocr_retry_count: None, + ocr_failure_reason: None, tags: vec!["test".to_string()], created_at: chrono::Utc::now(), updated_at: chrono::Utc::now(), diff --git a/tests/integration_source_sync_hash_duplicate_tests.rs b/tests/integration_source_sync_hash_duplicate_tests.rs index 49c6666..fb9e3a3 100644 --- a/tests/integration_source_sync_hash_duplicate_tests.rs +++ b/tests/integration_source_sync_hash_duplicate_tests.rs @@ -54,6 +54,8 @@ fn create_test_document(user_id: Uuid, filename: &str, file_hash: String) -> Doc ocr_status: Some("pending".to_string()), ocr_error: None, ocr_completed_at: None, + ocr_retry_count: None, + ocr_failure_reason: None, tags: Vec::new(), created_at: Utc::now(), updated_at: Utc::now(), diff --git a/tests/integration_webdav_hash_duplicate_tests.rs b/tests/integration_webdav_hash_duplicate_tests.rs index 16b4bee..7b97e48 100644 --- a/tests/integration_webdav_hash_duplicate_tests.rs +++ b/tests/integration_webdav_hash_duplicate_tests.rs @@ -54,6 +54,8 @@ fn create_test_document(user_id: Uuid, filename: &str, file_hash: String) -> Doc ocr_status: Some("pending".to_string()), ocr_error: None, ocr_completed_at: None, + ocr_retry_count: None, + ocr_failure_reason: None, tags: Vec::new(), created_at: Utc::now(), updated_at: Utc::now(), diff --git a/tests/unit_unit_tests.rs b/tests/unit_unit_tests.rs index a7a1c17..edf7238 100644 --- a/tests/unit_unit_tests.rs +++ b/tests/unit_unit_tests.rs @@ -20,6 +20,8 @@ fn test_document_response_conversion_with_ocr() { ocr_status: Some("completed".to_string()), ocr_error: None, ocr_completed_at: Some(Utc::now()), + ocr_retry_count: None, + ocr_failure_reason: None, tags: vec!["test".to_string()], created_at: Utc::now(), updated_at: Utc::now(), @@ -57,6 +59,8 @@ fn test_document_response_conversion_without_ocr() { ocr_status: Some("pending".to_string()), ocr_error: None, ocr_completed_at: None, + ocr_retry_count: None, + ocr_failure_reason: None, tags: vec![], created_at: Utc::now(), updated_at: Utc::now(),