feat(tests): fix ocr_retry issues in tests

This commit is contained in:
perf3ct
2025-07-02 19:16:13 +00:00
parent 3c4e06fa77
commit ae33b25133
6 changed files with 14 additions and 0 deletions

View File

@@ -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(),

View File

@@ -54,6 +54,8 @@ fn create_test_document(user_id: Uuid, filename: &str, file_hash: Option<String>
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(),

View File

@@ -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(),

View File

@@ -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(),

View File

@@ -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(),

View File

@@ -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(),