feat(tests): resolve issues with changes to config struct with user_watch dir
This commit is contained in:
parent
9822f67968
commit
6158e2d77a
|
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue