common: add basic database tests; skip when DB unavailable

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I10be55f54495c07de19ed26a03c9596c6a6a6964
This commit is contained in:
raf 2025-11-02 23:04:20 +03:00
commit cbf16a7e63
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
4 changed files with 329 additions and 4 deletions

View file

@ -30,7 +30,8 @@ impl Database {
Ok(Self { pool })
}
#[must_use] pub const fn pool(&self) -> &PgPool {
#[must_use]
pub const fn pool(&self) -> &PgPool {
&self.pool
}

View file

@ -7,9 +7,6 @@ pub mod migrate;
pub mod migrate_cli;
pub mod models;
#[cfg(test)]
mod tests;
pub use config::*;
pub use database::*;
pub use error::*;