diff --git a/backend/tests/common/mod.rs b/backend/tests/common/mod.rs index b327264..c9d642b 100644 --- a/backend/tests/common/mod.rs +++ b/backend/tests/common/mod.rs @@ -117,6 +117,13 @@ impl TestApp { turnstile_site_key: "test-site-key".into(), }; + // Create the static dir so ServeDir/ServeFile don't hang + let _ = std::fs::create_dir_all(&config.static_dir); + let index_path = format!("{}/index.html", config.static_dir); + if !std::path::Path::new(&index_path).exists() { + let _ = std::fs::write(&index_path, "test"); + } + let http_client = reqwest::Client::new(); let state = AppState::new(config.clone(), pool.clone(), http_client); let router = build_router(state, &config);