mirror of
https://github.com/Xevion/Pac-Man.git
synced 2026-01-31 06:25:09 -06:00
test(server): gate PostgreSQL tests behind postgres-tests feature
Move testcontainers to optional dependency and create feature flag for database integration tests. Tests without the feature use a dummy pool and skip database operations.
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
mod common;
|
||||
use crate::common::test_context;
|
||||
use cookie::Cookie;
|
||||
use pacman_server::{data::user as user_repo, session};
|
||||
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
/// Test session management (requires postgres-tests feature)
|
||||
#[tokio::test]
|
||||
#[cfg(feature = "postgres-tests")]
|
||||
async fn test_session_management() {
|
||||
use crate::common::test_context;
|
||||
use cookie::Cookie;
|
||||
use pacman_server::{data::user as user_repo, session};
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
let context = test_context().use_database(true).call().await;
|
||||
|
||||
// 1. Create a user and link a provider account
|
||||
|
||||
Reference in New Issue
Block a user