Goal
Add integration tests for media handlers that interact with the database. These tests use in-memory SQLite with AppState { client: None, bucket: None } and do NOT require R2 storage.
File to edit
api/src/media.rs
Setup helper
use crate::AppState;
async fn setup_media_db() -> AppState {
let db = sqlx::SqlitePool::connect("sqlite::memory:").await.unwrap();
sqlx::migrate!("../migrations").run(&db).await.unwrap();
AppState { db, client: None, bucket: None }
}
How to run
cd api && cargo test media
Sub-issues (pick one)
Goal
Add integration tests for media handlers that interact with the database. These tests use in-memory SQLite with
AppState { client: None, bucket: None }and do NOT require R2 storage.File to edit
api/src/media.rsSetup helper
How to run
Sub-issues (pick one)