mirror of
https://github.com/Xevion/Pac-Man.git
synced 2026-01-31 00:24:59 -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,11 +1,11 @@
|
||||
mod common;
|
||||
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[cfg(feature = "postgres-tests")]
|
||||
use crate::common::{test_context, TestContext};
|
||||
|
||||
/// Test health endpoint functionality with real database connectivity
|
||||
/// Test health endpoint with PostgreSQL (requires postgres-tests feature)
|
||||
#[tokio::test]
|
||||
#[cfg(feature = "postgres-tests")]
|
||||
async fn test_health_endpoint() {
|
||||
let TestContext { server, container, .. } = test_context().use_database(true).call().await;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user