From 8d36f733263c84cc69c93c46d9efb7055e71c5ff Mon Sep 17 00:00:00 2001 From: Tristan Garwood Date: Mon, 15 Jul 2024 19:55:02 -0400 Subject: [PATCH] Add test for constrained policy group version update --- .../workbench/sam/google/GoogleExtensionSpec.scala | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/scala/org/broadinstitute/dsde/workbench/sam/google/GoogleExtensionSpec.scala b/src/test/scala/org/broadinstitute/dsde/workbench/sam/google/GoogleExtensionSpec.scala index 74dd021be..3b846c2ba 100644 --- a/src/test/scala/org/broadinstitute/dsde/workbench/sam/google/GoogleExtensionSpec.scala +++ b/src/test/scala/org/broadinstitute/dsde/workbench/sam/google/GoogleExtensionSpec.scala @@ -1094,6 +1094,8 @@ class GoogleExtensionSpec(_system: ActorSystem) runAndWait(googleExtensions.onGroupUpdate(Seq(managedGroupRPN), Set.empty, samRequestContext)) verify(mockGoogleGroupSyncPubSubDAO, times(1)).publishMessages(any[String], any[Seq[MessageRequest]]) + + verify(mockDirectoryDAO, times(2)).updateGroupUpdatedDateAndVersionWithSession(any[WorkbenchGroupIdentity], any[SamRequestContext]) } it should "trigger updates to constrained policies when updating a group that is a part of a managed group" in { @@ -1603,6 +1605,14 @@ class GoogleExtensionSpec(_system: ActorSystem) val intersectionGroup = synchronizer.calculateIntersectionGroup(resource.fullyQualifiedId, accessPolicy, samRequestContext).unsafeRunSync() intersectionGroup shouldEqual Set(inBothSubGroupUser.id) +// +// val updatedGroup = dirDAO +// .loadGroup( +// inPolicySubGroup.id, +// samRequestContext = samRequestContext +// ) +// .unsafeRunSync() +// updatedGroup.get.version shouldEqual 2 } it should "return the policy members if there is no auth domain set" in {