feat(db): add Db handle with pool connect and readiness ping

This commit is contained in:
2026-06-02 00:54:17 +02:00
parent db6183405e
commit 8da3eefdce
2 changed files with 49 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
use db::Db;
use sqlx::PgPool;
#[sqlx::test]
async fn ping_succeeds(pool: PgPool) {
let db = Db::from_pool(pool);
db.ping()
.await
.expect("ping should succeed against a live database");
}