Skip to content

Commit

Permalink
Add test for constrained policy group version update
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghost-in-a-Jar committed Jul 15, 2024
1 parent 4715f7f commit 8d36f73
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 8d36f73

Please sign in to comment.