Skip to content

Commit 5b27bee

Browse files
fix(drive): correct integration test
1 parent 338915a commit 5b27bee

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/application/services/subject_group_service.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,14 @@ mod integration_tests {
563563
let pool = Arc::new(pool);
564564
let repo = Arc::new(SubjectGroupPgRepository::new(pool.clone()));
565565
let user_storage = Arc::new(UserPgRepository::new(pool.clone()));
566-
SubjectGroupService::new(repo, pool, user_storage)
566+
// The engine is wired so `add_member` / `remove_member` can invalidate
567+
// their stale `user_groups_cache` entries (the production path).
568+
// A stub engine is enough — these tests never trigger an authz SQL
569+
// round-trip, only the in-memory cache invalidation calls. The stub's
570+
// lazy invalid pool would panic if reached, surfacing any drift if a
571+
// future test starts exercising real authz lookups.
572+
let engine = Arc::new(crate::infrastructure::services::pg_acl_engine::PgAclEngine::new_stub());
573+
SubjectGroupService::new(repo, pool, user_storage, engine)
567574
}
568575

569576
async fn first_admin(pool: &sqlx::PgPool) -> Uuid {

0 commit comments

Comments
 (0)