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:
2026-01-07 00:00:29 -06:00
parent bf2a2a34e4
commit 93381ba5cb
8 changed files with 159 additions and 92 deletions
+5 -1
View File
@@ -52,8 +52,13 @@ rustls = { version = "0.23", features = ["ring"] }
image = { version = "0.25", features = ["png", "jpeg"] }
sha2 = "0.10"
mockall = "0.14.0"
testcontainers = { version = "0.25.0", optional = true }
# validator = { version = "0.16", features = ["derive"] }
[features]
default = []
postgres-tests = ["dep:testcontainers"]
[dev-dependencies]
tokio = { version = "1", features = ["full"] }
http = "1"
@@ -63,7 +68,6 @@ bytes = "1"
anyhow = "1"
axum-test = "18.1.0"
pretty_assertions = "1.4.1"
testcontainers = "0.25.0"
bon = "3.7.2"
cookie = "0.18.1"