diff --git a/tests/test.rs b/tests/test.rs index 47042a3..052c0da 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -1,7 +1,7 @@ -use std::io::Write; +// use std::io::Write; -use common_multipart_rfc7578::client::multipart::{Body as MultipartBody, Form as MultipartForm}; -use tower::ServiceExt; +// use common_multipart_rfc7578::client::multipart::{Body as MultipartBody, Form as MultipartForm}; +// use tower::ServiceExt; use textsender_api::db; @@ -73,6 +73,7 @@ mod db_mgr { } } + /* pub async fn migrations(pool: &sqlx::PgPool) { // Run migrations using the sqlx::migrate! macro // Assumes your test migrations are in a ./test_migrations folder relative to Cargo.toml @@ -81,6 +82,7 @@ mod db_mgr { .await .expect("Failed to run migrations"); } + */ } mod init { @@ -89,7 +91,8 @@ mod init { .await .layer(axum::Extension(pool)) .layer(axum::extract::DefaultBodyLimit::max(1024 * 1024 * 1024)) - .layer(tower_http::timeout::TimeoutLayer::new( + .layer(tower_http::timeout::TimeoutLayer::with_status_code( + axum::http::StatusCode::OK, std::time::Duration::from_secs(300), )) } @@ -110,10 +113,12 @@ mod util { serde_json::from_slice(&body).unwrap() } + /* pub async fn format_url_with_value(endpoint: &str, value: &uuid::Uuid) -> String { let last = endpoint.len() - 5; format!("{}/{value}", &endpoint[0..last]) } + */ } pub fn token_fields() -> (String, String, String) {