fix(drive): correct integration test

This commit is contained in:
Edouard Vanbelle
2026-06-24 02:44:25 +02:00
parent 338915a912
commit 754e6239da
4 changed files with 28 additions and 4 deletions
+7 -1
View File
@@ -201,7 +201,13 @@ impl PgAclEngine {
/// without a real PostgreSQL pool. Connecting to the lazy pool will
/// fail at runtime — only safe in tests that exercise types, not actual
/// authz queries.
#[cfg(test)]
///
/// Visible under both `cfg(test)` (the standard unit-test build) and
/// `cfg(integration_tests)` (the gated-by-RUSTFLAGS integration
/// build). The `SubjectGroupService` integration tests construct the
/// service with a stub engine, since they only exercise the engine's
/// in-memory cache invalidation calls — never its SQL paths.
#[cfg(any(test, integration_tests))]
pub fn new_stub() -> Self {
let pool = sqlx::pool::PoolOptions::<sqlx::Postgres>::new()
.max_connections(1)