Skip to content

Commit

Permalink
Fix bug: federatorInternal host not set for background-worker (#3516)
Browse files Browse the repository at this point in the history
  • Loading branch information
smatting authored Aug 18, 2023
1 parent 48ac13c commit 02bbf2a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions integration/test/Testlib/ModService.hs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ startDynamicBackend resource staticPorts beOverrides = do
>=> setKeyspace srv
>=> setEsIndex srv
>=> setFederationSettings srv
>=> setAwsAdnQueuesConfigs srv
>=> setAwsConfigs srv
>=> setLogLevel srv
)
defaultServiceOverridesToMap
Expand All @@ -176,42 +176,43 @@ startDynamicBackend resource staticPorts beOverrides = do
in Map.insert resource.berDomain (setFederatorPorts resource $ updateServiceMap ports templateBackend) sm
)
where
setAwsAdnQueuesConfigs :: Service -> Value -> App Value
setAwsAdnQueuesConfigs = \case
setAwsConfigs :: Service -> Value -> App Value
setAwsConfigs = \case
Brig ->
setField "aws.userJournalQueue" resource.berAwsUserJournalQueue
>=> setField "aws.prekeyTable" resource.berAwsPrekeyTable
>=> setField "internalEvents.queueName" resource.berBrigInternalEvents
>=> setField "emailSMS.email.sesQueue" resource.berEmailSMSSesQueue
>=> setField "emailSMS.general.emailSender" resource.berEmailSMSEmailSender
>=> setField "rabbitmq.vHost" resource.berVHost
Cargohold -> setField "aws.s3Bucket" resource.berAwsS3Bucket
Gundeck -> setField "aws.queueName" resource.berAwsQueueName
Galley ->
setField "journal.queueName" resource.berGalleyJournal
>=> setField "rabbitmq.vHost" resource.berVHost
_ -> pure

setFederationSettings :: Service -> Value -> App Value
setFederationSettings =
\case
Brig ->
setField "optSettings.setFederationDomain" resource.berDomain
>=> setField
"optSettings.setFederationDomainConfigs"
([] :: [Value])
>=> setField "optSettings.setFederationDomainConfigs" ([] :: [Value])
>=> setField "federatorInternal.port" resource.berFederatorInternal
>=> setField "federatorInternal.host" ("127.0.0.1" :: String)
>=> setField "rabbitmq.vHost" resource.berVHost
Cargohold ->
setField "settings.federationDomain" resource.berDomain
>=> setField "federator.host" ("127.0.0.1" :: String)
>=> setField "federator.port" resource.berFederatorInternal
Galley ->
setField "settings.federationDomain" resource.berDomain
>=> setField "settings.featureFlags.classifiedDomains.config.domains" [resource.berDomain]
>=> setField "federator.host" ("127.0.0.1" :: String)
>=> setField "federator.port" resource.berFederatorInternal
>=> setField "rabbitmq.vHost" resource.berVHost
Gundeck -> setField "settings.federationDomain" resource.berDomain
BackgroundWorker ->
setField "federatorInternal.port" resource.berFederatorInternal
>=> setField "federatorInternal.host" ("127.0.0.1" :: String)
>=> setField "rabbitmq.vHost" resource.berVHost
_ -> pure

Expand Down

0 comments on commit 02bbf2a

Please sign in to comment.