From 9822f679685ad8874724038be3457a342f88270a Mon Sep 17 00:00:00 2001 From: perfectra1n Date: Wed, 30 Jul 2025 20:45:24 -0700 Subject: [PATCH] fix(tests): resolve issues with new config fields for user_watch in tests --- tests/integration_document_upload_hash_duplicate_tests.rs | 2 ++ tests/integration_ignored_files_integration_tests.rs | 2 ++ tests/integration_oidc_tests.rs | 4 ++++ tests/integration_source_sync_hash_duplicate_tests.rs | 2 ++ tests/integration_webdav_comprehensive_tests.rs | 2 ++ tests/unit_oidc_unit_tests.rs | 2 ++ 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 7c54521..bd1f531 100644 --- a/tests/integration_document_upload_hash_duplicate_tests.rs +++ b/tests/integration_document_upload_hash_duplicate_tests.rs @@ -77,6 +77,8 @@ async fn create_test_app_state() -> Result> { jwt_secret: "test-secret".to_string(), upload_path: "./test-uploads".to_string(), watch_folder: "./test-watch".to_string(), + user_watch_base_dir: "./user_watch".to_string(), + enable_per_user_watch: false, allowed_file_types: vec!["pdf".to_string(), "txt".to_string()], watch_interval_seconds: Some(30), file_stability_check_ms: Some(500), diff --git a/tests/integration_ignored_files_integration_tests.rs b/tests/integration_ignored_files_integration_tests.rs index ffd7f01..30e31df 100644 --- a/tests/integration_ignored_files_integration_tests.rs +++ b/tests/integration_ignored_files_integration_tests.rs @@ -21,6 +21,8 @@ async fn create_test_app_state() -> Result> { jwt_secret: "test_secret".to_string(), upload_path: "./test_uploads".to_string(), watch_folder: "./test_watch".to_string(), + user_watch_base_dir: "./user_watch".to_string(), + enable_per_user_watch: false, allowed_file_types: vec!["pdf".to_string(), "txt".to_string()], watch_interval_seconds: Some(30), file_stability_check_ms: Some(500), diff --git a/tests/integration_oidc_tests.rs b/tests/integration_oidc_tests.rs index 7e2f5ee..8f9c3c4 100644 --- a/tests/integration_oidc_tests.rs +++ b/tests/integration_oidc_tests.rs @@ -20,6 +20,8 @@ mod tests { jwt_secret: "test-secret".to_string(), upload_path: "./test-uploads".to_string(), watch_folder: "./test-watch".to_string(), + user_watch_base_dir: "./user_watch".to_string(), + enable_per_user_watch: false, allowed_file_types: vec!["pdf".to_string()], watch_interval_seconds: Some(30), file_stability_check_ms: Some(500), @@ -100,6 +102,8 @@ mod tests { jwt_secret: "test-secret".to_string(), upload_path: "./test-uploads".to_string(), watch_folder: "./test-watch".to_string(), + user_watch_base_dir: "./user_watch".to_string(), + enable_per_user_watch: false, allowed_file_types: vec!["pdf".to_string()], watch_interval_seconds: Some(30), file_stability_check_ms: Some(500), diff --git a/tests/integration_source_sync_hash_duplicate_tests.rs b/tests/integration_source_sync_hash_duplicate_tests.rs index ab6c205..8ff5265 100644 --- a/tests/integration_source_sync_hash_duplicate_tests.rs +++ b/tests/integration_source_sync_hash_duplicate_tests.rs @@ -126,6 +126,8 @@ async fn create_test_app_state() -> Result> { jwt_secret: "test-secret".to_string(), upload_path: "./test-uploads".to_string(), watch_folder: "./test-watch".to_string(), + user_watch_base_dir: "./user_watch".to_string(), + enable_per_user_watch: false, allowed_file_types: vec!["pdf".to_string(), "txt".to_string()], watch_interval_seconds: Some(30), file_stability_check_ms: Some(500), diff --git a/tests/integration_webdav_comprehensive_tests.rs b/tests/integration_webdav_comprehensive_tests.rs index 5da4b35..0ee335e 100644 --- a/tests/integration_webdav_comprehensive_tests.rs +++ b/tests/integration_webdav_comprehensive_tests.rs @@ -330,6 +330,8 @@ fn test_webdav_scheduler_creation() { server_address: "127.0.0.1:3000".to_string(), upload_path: "/tmp/test_uploads".to_string(), watch_folder: "/tmp/test_watch".to_string(), + user_watch_base_dir: "./user_watch".to_string(), + enable_per_user_watch: false, jwt_secret: "test_secret".to_string(), allowed_file_types: vec!["pdf".to_string(), "png".to_string()], watch_interval_seconds: Some(10), diff --git a/tests/unit_oidc_unit_tests.rs b/tests/unit_oidc_unit_tests.rs index c176570..e217434 100644 --- a/tests/unit_oidc_unit_tests.rs +++ b/tests/unit_oidc_unit_tests.rs @@ -9,6 +9,8 @@ fn create_test_config_with_oidc(issuer_url: &str) -> Config { jwt_secret: "test-secret".to_string(), upload_path: "./test-uploads".to_string(), watch_folder: "./test-watch".to_string(), + user_watch_base_dir: "./user_watch".to_string(), + enable_per_user_watch: false, allowed_file_types: vec!["pdf".to_string()], watch_interval_seconds: Some(30), file_stability_check_ms: Some(500),