From df10db666de4bedaf78d265ea8536910d1f7a704 Mon Sep 17 00:00:00 2001 From: Tristan Garwood Date: Mon, 15 Jul 2024 19:19:28 -0400 Subject: [PATCH] fix GoogleExtensionSpec --- .../sam/google/GoogleExtensionSpec.scala | 18 ++++++++++++++++++ 1 file changed, 18 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 9b53ae49f..74dd021be 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 @@ -1080,6 +1080,12 @@ class GoogleExtensionSpec(_system: ActorSystem) when(mockDirectoryDAO.getSynchronizedDate(any[FullyQualifiedPolicyId], any[SamRequestContext])) .thenReturn(IO.pure(Some(new GregorianCalendar(2018, 8, 26).getTime()))) when(mockGoogleGroupSyncPubSubDAO.publishMessages(any[String], any[Seq[MessageRequest]])).thenReturn(Future.successful(())) + when( + mockDirectoryDAO.updateGroupUpdatedDateAndVersionWithSession( + any[WorkbenchGroupIdentity], + any[SamRequestContext] + ) + ).thenReturn(IO.unit) // mock responses for onManagedGroupUpdate when(mockAccessPolicyDAO.listSyncedAccessPolicyIdsOnResourcesConstrainedByGroup(WorkbenchGroupName(managedGroupId), Set.empty, samRequestContext)) @@ -1130,6 +1136,12 @@ class GoogleExtensionSpec(_system: ActorSystem) when(mockDirectoryDAO.getSynchronizedDate(any[FullyQualifiedPolicyId], any[SamRequestContext])) .thenReturn(IO.pure(Some(new GregorianCalendar(2018, 8, 26).getTime()))) when(mockGoogleGroupSyncPubSubDAO.publishMessages(any[String], any[Seq[MessageRequest]])).thenReturn(Future.successful(())) + when( + mockDirectoryDAO.updateGroupUpdatedDateAndVersionWithSession( + any[WorkbenchGroupIdentity], + any[SamRequestContext] + ) + ).thenReturn(IO.unit) // mock ancestor call to establish subgroup relationship to managed group when(mockDirectoryDAO.listAncestorGroups(WorkbenchGroupName(subGroupId), samRequestContext)) @@ -1184,6 +1196,12 @@ class GoogleExtensionSpec(_system: ActorSystem) when(mockDirectoryDAO.getSynchronizedDate(any[FullyQualifiedPolicyId], any[SamRequestContext])) .thenReturn(IO.pure(Some(new GregorianCalendar(2018, 8, 26).getTime()))) when(mockGoogleGroupSyncPubSubDAO.publishMessages(any[String], any[Seq[MessageRequest]])).thenReturn(Future.successful(())) + when( + mockDirectoryDAO.updateGroupUpdatedDateAndVersionWithSession( + any[WorkbenchGroupIdentity], + any[SamRequestContext] + ) + ).thenReturn(IO.unit) // mock ancestor call to establish nested group structure for owner policy and subgroup in managed group when(mockDirectoryDAO.listAncestorGroups(WorkbenchGroupName(subGroupId), samRequestContext))