feat(tests): resolve issues with changes to config struct with user_watch dir

This commit is contained in:
perfectra1n
2025-07-30 20:58:11 -07:00
parent 9822f67968
commit 6158e2d77a
12 changed files with 16 additions and 0 deletions

View File

@@ -37,6 +37,8 @@ async fn create_test_app_state() -> Arc<AppState> {
jwt_secret: "test_secret".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,
allowed_file_types: vec!["pdf".to_string(), "txt".to_string()],
watch_interval_seconds: None,
file_stability_check_ms: None,
@@ -69,6 +71,7 @@ async fn create_test_app_state() -> Arc<AppState> {
queue_service,
oidc_client: None,
sync_progress_tracker: std::sync::Arc::new(readur::services::sync_progress_tracker::SyncProgressTracker::new()),
user_watch_service: None,
})
}

View File

@@ -35,6 +35,8 @@ async fn create_test_app_state() -> Arc<AppState> {
jwt_secret: "test_secret".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,
allowed_file_types: vec!["pdf".to_string(), "txt".to_string()],
watch_interval_seconds: Some(30),
file_stability_check_ms: Some(500),

View File

@@ -109,6 +109,7 @@ async fn create_test_app_state() -> Result<Arc<AppState>> {
queue_service,
oidc_client: None,
sync_progress_tracker: std::sync::Arc::new(readur::services::sync_progress_tracker::SyncProgressTracker::new()),
user_watch_service: None,
}))
}

View File

@@ -52,6 +52,7 @@ async fn create_test_app_state() -> Result<Arc<AppState>> {
queue_service,
oidc_client: None,
sync_progress_tracker: std::sync::Arc::new(readur::services::sync_progress_tracker::SyncProgressTracker::new()),
user_watch_service: None,
}))
}

View File

@@ -68,6 +68,7 @@ mod tests {
)),
oidc_client: None,
sync_progress_tracker: std::sync::Arc::new(readur::services::sync_progress_tracker::SyncProgressTracker::new()),
user_watch_service: None,
}));
(app, ())
@@ -159,6 +160,7 @@ mod tests {
)),
oidc_client,
sync_progress_tracker: std::sync::Arc::new(readur::services::sync_progress_tracker::SyncProgressTracker::new()),
user_watch_service: None,
}));
(app, mock_server)

View File

@@ -57,6 +57,7 @@ async fn create_test_app_state() -> Arc<AppState> {
queue_service,
oidc_client: None,
sync_progress_tracker: std::sync::Arc::new(readur::services::sync_progress_tracker::SyncProgressTracker::new()),
user_watch_service: None,
})
}

View File

@@ -203,6 +203,7 @@ async fn create_test_app_state() -> Arc<AppState> {
queue_service,
oidc_client: None,
sync_progress_tracker: std::sync::Arc::new(readur::services::sync_progress_tracker::SyncProgressTracker::new()),
user_watch_service: None,
})
}

View File

@@ -158,6 +158,7 @@ async fn create_test_app_state() -> Result<Arc<AppState>> {
queue_service,
oidc_client: None,
sync_progress_tracker: std::sync::Arc::new(readur::services::sync_progress_tracker::SyncProgressTracker::new()),
user_watch_service: None,
}))
}

View File

@@ -68,6 +68,7 @@ async fn create_test_app_state() -> Arc<AppState> {
queue_service,
oidc_client: None,
sync_progress_tracker: std::sync::Arc::new(readur::services::sync_progress_tracker::SyncProgressTracker::new()),
user_watch_service: None,
})
}

View File

@@ -165,6 +165,7 @@ async fn create_test_app_state() -> Arc<AppState> {
queue_service,
oidc_client: None,
sync_progress_tracker: Arc::new(readur::services::sync_progress_tracker::SyncProgressTracker::new()),
user_watch_service: None,
})
}

View File

@@ -156,6 +156,7 @@ async fn create_test_app_state() -> Result<Arc<AppState>> {
queue_service,
oidc_client: None,
sync_progress_tracker: std::sync::Arc::new(readur::services::sync_progress_tracker::SyncProgressTracker::new()),
user_watch_service: None,
}))
}

View File

@@ -116,6 +116,7 @@ async fn setup_test_app() -> (Router, Arc<AppState>) {
queue_service,
oidc_client: None,
sync_progress_tracker: std::sync::Arc::new(readur::services::sync_progress_tracker::SyncProgressTracker::new()),
user_watch_service: None,
});
let app = Router::new()