Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
9823fd0
nit-pick.
fisx Aug 22, 2023
a347a75
nit-pick.
fisx Aug 22, 2023
88f202f
Call `getRemoteDomains` in a loop (again).
fisx Aug 22, 2023
8752761
Remove dead code.
fisx Aug 22, 2023
3d4ffc1
Don't call brig from background-worker.
fisx Aug 22, 2023
3998753
Changelog.
fisx Aug 22, 2023
06e2f3f
make sanitize-pr
fisx Aug 22, 2023
de782bf
Merge remote-tracking branch 'origin/develop' into WPB-3796/fix-backg…
fisx Aug 24, 2023
90477ca
Make config value required, make it milliseconds and Int.
fisx Aug 24, 2023
21c5770
rename.
fisx Aug 24, 2023
ff59df1
Fixups
fisx Aug 24, 2023
3e2a4c3
Fix bug about ensuring rabbitMQ queues and namespaces.
fisx Aug 24, 2023
07042e7
Fix integration tests.
fisx Aug 24, 2023
7265f2d
FUTUREWORK.
fisx Aug 24, 2023
cc820b8
TODO
fisx Aug 24, 2023
3252b16
Move BackgroundNotifications module to a more suitlable place.
fisx Aug 25, 2023
a6230d3
Move BackgroundNotifications module (cleanup).
fisx Aug 25, 2023
de0cabd
Clean up ensureQueue mess.
fisx Aug 25, 2023
1277282
Cleanup `remotesRefreshInterval` unit inconsistency.
fisx Aug 25, 2023
883c063
make sanitize-pr
fisx Aug 25, 2023
f76a1c6
Remove seemless-migration-to-database-remotes hack.
fisx Aug 25, 2023
815d15d
Update changelog.
fisx Aug 25, 2023
ca6c633
Merge remote-tracking branch 'origin/develop' into WPB-3796/fix-backg…
fisx Aug 25, 2023
4ce60fc
Fixup
fisx Aug 25, 2023
e38a6c7
Merge remote-tracking branch 'origin/develop' into WPB-3796/fix-backg…
fisx Aug 28, 2023
cb6184c
...
fisx Aug 28, 2023
f3440fd
...
fisx Aug 28, 2023
15c0cef
...
fisx Aug 28, 2023
2200da8
...
fisx Sep 4, 2023
97856cd
Fixup
fisx Sep 4, 2023
d456a7c
Fixup
fisx Sep 4, 2023
b9afef6
Fixup
fisx Sep 4, 2023
eb7ee50
Fixup
fisx Sep 4, 2023
dc70e1c
Fixup
fisx Sep 4, 2023
1e7d00c
Fix two tests.
fisx Sep 4, 2023
c5bb489
Merge remote-tracking branch 'origin/develop' into WPB-3796/fix-backg…
fisx Sep 4, 2023
fddd9c9
stash
fisx Sep 5, 2023
91718c1
Added origin domain to e2e config, added search policy to failing test.
elland Sep 5, 2023
195c51c
Restored test assertion.
elland Sep 5, 2023
878b407
Merge remote-tracking branch 'origin/develop' into WPB-3796/fix-backg…
fisx Sep 5, 2023
24ce4f9
Bumped timeout for offline BE notification
elland Sep 5, 2023
b244bf0
Better names, better types.
fisx Sep 5, 2023
8c8da68
Cleanup.
fisx Sep 5, 2023
12d11cb
Cleanup.
fisx Sep 5, 2023
606476c
Merge remote-tracking branch 'refs/remotes/origin/WPB-3796/fix-backgr…
fisx Sep 5, 2023
b854f6d
Cleanup.
fisx Sep 5, 2023
d716699
Cleanup.
fisx Sep 5, 2023
055f55d
hi ci
elland Sep 6, 2023
abd25da
Merge remote-tracking branch 'origin/develop' into WPB-3796/fix-backg…
fisx Sep 6, 2023
3ac378b
Fix: AllowAll has default search policy FullSearch.
fisx Sep 6, 2023
29e3429
Revert "Fix: AllowAll has default search policy FullSearch."
fisx Sep 6, 2023
b246036
Fix federator integration tests. All green now?
fisx Sep 7, 2023
d47e4df
hi ci
elland Sep 7, 2023
f32375d
Fixup
fisx Sep 7, 2023
00fd31a
Merge remote-tracking branch 'refs/remotes/origin/WPB-3796/fix-backgr…
fisx Sep 7, 2023
67b7b2e
Merge remote-tracking branch 'origin/develop' into WPB-3796/fix-backg…
fisx Sep 7, 2023
2a86f02
Fixup
fisx Sep 7, 2023
b0f3e4d
hi ci
fisx Sep 7, 2023
4f246bf
Re-align brig-integration config file on ci.
fisx Sep 8, 2023
4d6e6da
Increase time to wait for events in /integration.
fisx Sep 8, 2023
06e21e2
Fixup?
fisx Sep 8, 2023
f2cf937
Merge remote-tracking branch 'origin/develop' into WPB-3796/fix-backg…
fisx Sep 8, 2023
a6927ba
Fixup!
fisx Sep 9, 2023
7c8bf45
*sigh*
fisx Sep 10, 2023
975f142
?!
fisx Sep 11, 2023
5f89f96
...
fisx Sep 11, 2023
3bbcf4d
Merge remote-tracking branch 'origin/develop' into WPB-3796/fix-backg…
fisx Sep 11, 2023
23b7130
Makefile: clean up federation_remotes before `make ci-fast`.
fisx Sep 11, 2023
4c34668
Fix one more.
fisx Sep 11, 2023
5f74ad8
Nit-pick.
fisx Sep 11, 2023
e65ef0b
...
fisx Sep 12, 2023
43dd731
stash
fisx Sep 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ endif
#
# If you want to pass arguments to the test-suite call cabal-run-integration.sh directly.
.PHONY: ci-fast
ci-fast: c db-migrate
ci-fast: c db-migrate cqlsh_clear_federation_remotes
ifeq ("$(package)", "all")
./hack/bin/cabal-run-integration.sh all
./hack/bin/cabal-run-integration.sh integration
Expand Down Expand Up @@ -270,6 +270,18 @@ cqlsh:
@echo "make sure you have ./deploy/dockerephemeral/run.sh running in another window!"
docker exec -it $(CASSANDRA_CONTAINER) /usr/bin/cqlsh

.PHONY: cqlsh_clear_federation_remotes
cqlsh_clear_federation_remotes:
$(eval CASSANDRA_CONTAINER := $(shell docker ps | grep '/cassandra:' | perl -ne '/^(\S+)\s/ && print $$1'))
@echo "make sure you have ./deploy/dockerephemeral/run.sh running in another window!"
for ts in brig_test{,2} brig_dyn1_test brig_dyn2_test brig_dyn3_test; do echo "truncate $ts.federation_remotes if exists" ; done
echo "truncate brig_test.federation_remotes; \
truncate brig_test2.federation_remotes; \
truncate brig_test_dyn_1.federation_remotes; \
truncate brig_test_dyn_2.federation_remotes; \
truncate brig_test_dyn_3.federation_remotes;" | \
docker exec -i $(CASSANDRA_CONTAINER) /usr/bin/cqlsh

.PHONY: db-reset-package
db-reset-package:
@echo "Deprecated! Please use 'db-reset' instead"
Expand Down
15 changes: 15 additions & 0 deletions changelog.d/0-release-notes/WPB-3796
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
New config value
`background-worker.backendNotificationPusher.remotesRefreshIntervalMs`.
If in doubt, set to 30000 ms. (This controls the delay between
backend-to-backend notification queue update pulls from rabbitMQ to
background-worker.)

If you have enabled federation and therefore rabbitMQ before this
upgrade, you should remove all queues called
`backend-notifications.delete-federation` manually.

Remote federation domains in the config file are no longer supported.
Before deploying this release, make sure you have completed the
migration steps from [the CHANGELOG of Chart Release 4.36.0 (search
for "remote connections can be configured via an internal REST
API")](https://github.com/wireapp/wire-server/releases/tag/v2023-08-11).
1 change: 1 addition & 0 deletions changelog.d/3-bug-fixes/WPB-3796
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[background-worker] Get federation remote domains from rabbitMQ, not from brig (this fixes a bug in federation policy `allowAll`)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was no release made with this bug, so you can also just drop this changelog.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above.

1 change: 1 addition & 0 deletions charts/background-worker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ config:
backendNotificationPusher:
pushBackoffMinWait: 10000 # in microseconds, so 10ms
pushBackoffMaxWait: 300000000 # microseconds, so 300s
remotesRefreshInterval: 30000000 # microseconds, so 3s

serviceAccount:
# When setting this to 'false', either make sure that a service account named
Expand Down
6 changes: 0 additions & 6 deletions charts/brig/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,6 @@ data:
{{- if .setFederationDomainConfigsUpdateFreq }}
setFederationDomainConfigsUpdateFreq: {{ .setFederationDomainConfigsUpdateFreq }}
{{- end }}
{{- if .setFederationDomainConfigs }}
# 'setFederationDomainConfigs' is deprecated as of https://github.com/wireapp/wire-server/pull/3260. See
# https://docs.wire.com/understand/federation/backend-communication.html#configuring-remote-connections
# for details.
setFederationDomainConfigs: {{ toYaml .setFederationDomainConfigs | nindent 8 }}
{{- end }}
{{- if .setSearchSameTeamOnly }}
setSearchSameTeamOnly: {{ .setSearchSameTeamOnly }}
{{- end }}
Expand Down
4 changes: 4 additions & 0 deletions charts/brig/templates/tests/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ data:
cert: /etc/wire/integration-secrets/provider-publiccert.pem
botHost: https://brig-integration

originDomain: 612c6a18-4e3e-11ee-a205-97507f092421.example.com

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having this hard-coded like this raises an eyebrow. Why is this not dynamic?


backendTwo:
brig:
host: brig.{{ .Release.Namespace }}-fed2.svc.cluster.local
Expand Down Expand Up @@ -87,3 +89,5 @@ data:
federatorExternal:
host: federator.{{ .Release.Namespace }}-fed2.svc.cluster.local
port: 8081

originDomain: 6da818ea-4e26-11ee-9422-9b252c5bbf2b.example.com
4 changes: 4 additions & 0 deletions charts/integration/templates/integration-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,7 @@ spec:
secretKeyRef:
name: brig
key: rabbitmqPassword
- name: TEST_INCLUDE

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably remove this before merging? :)

value: ""
- name: TASTY_PATTERN
value: "(!/turn/&&!/user.auth.cookies.limit/)&&/search users on remote backend/"
28 changes: 24 additions & 4 deletions docs/src/developer/developer/how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ make kube-integration-setup

#### Deploy your local code to a kind cluster

This can be useful to get quicker feedback while working on multi-backend code or configuration (e.g. helm charts) than to wait an hour for CI. This allows you to test code without uploading it to github and waiting an hour for CI.

FUTUREWORK: this process is in development (update this section after it's confirmed to work):
This can be useful to get quicker feedback while working on multi-backend code or configuration (e.g. helm charts), or integration tests. It saves you uploading everything to github and waiting an hour for CI.

##### Run tests in kind

Expand All @@ -119,11 +117,33 @@ FUTUREWORK: this process is in development (update this section after it's confi

*Note:* First time all the images need to be uploaded. When working on one
service it can be selectively uploaded using `make kind-upload-image-<name>`
(e.g. `make kind-upload-image-brig`).
(e.g. `make kind-upload-image-{brig,integration}`).
2. Install wire-server using `make kind-integration-setup`.
3. Run tests using `make kind-integration-test`.
4. Run end2end integration tests: `make kind-integration-e2e`.

If you want to run only a particular test suite, [edit this line](https://github.com/wireapp/wire-server/blob/2dfc268f233cc7b42a75243f2fd0071b81aef65b/hack/bin/integration-test.sh#L14).

If you want to run only a particular test *case*, you can add env variables like `TASTY_PATTERN` or `TEST_INCLUDE` to [this block](https://github.com/wireapp/wire-server/blob/2dfc268f233cc7b42a75243f2fd0071b81aef65b/charts/integration/templates/integration-integration.yaml#L192-L209).

To shut everything down (sometimes RAM / CPU use stays high indefinitely otherwise):

1. `make kind-delete`

----------------------------------------------------------------------

make kind-integration-setup
make kind-integration-test



[needs kind] make ci-safe package=integration TEST_INCLUDE=Federation.testNotificationsForOfflineBackends


[fixed?] make ci-safe package=brig TASTY_PATTERN='(!/turn/&&!/user.auth.cookies.limit/)&&/search users on remote backend/'
[fixed?] make ci-safe package=brig TASTY_PATTERN='(!/turn/&&!/user.auth.cookies.limit/)&&/lookup user by qualified handle on remote backend/'




#### Deploy your local code to a kubernetes cluster
Expand Down
8 changes: 5 additions & 3 deletions docs/src/understand/configure-federation.md
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,11 @@ search policy if you create an entry.
#### If your instance has been federating before

You only need to read this section if your instance has been
federating with other instances prior to
[PR#3260](https://github.com/wireapp/wire-server/pull/3260), and you
are upgrading to the release containing that PR.
federating with other instances prior to [Chart Release
4.36.0](https://github.com/wireapp/wire-server/releases/tag/v2023-08-11),
and you are upgrading to that PR.

Ignore this section if your release is more recent than 4.38.0..

From now on the federation policy set in the federator config under
`federationStrategy` is ignored. Instead, the federation strategy is
Expand Down
2 changes: 1 addition & 1 deletion hack/bin/integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ UPLOAD_LOGS=${UPLOAD_LOGS:-0}
echo "Running integration tests on wire-server with parallelism=${HELM_PARALLELISM} ..."

CHART=wire-server
tests=(integration stern galley cargohold gundeck federator spar brig)
tests=(integration) # brig

cleanup() {
if (( CLEANUP_LOCAL_FILES > 0 )); then
Expand Down
16 changes: 1 addition & 15 deletions hack/helm_vars/wire-server/values.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,6 @@ brig:
setMaxConvSize: 16
# See helmfile for the real value
setFederationDomain: integration.example.com
setFederationDomainConfigs:
# 'setFederationDomainConfigs' is deprecated as of https://github.com/wireapp/wire-server/pull/3260. See
# https://docs.wire.com/understand/federation/backend-communication.html#configuring-remote-connections
# for details.
- domain: integration.example.com
search_policy: full_search
- domain: federation-test-helper.{{ .Release.Namespace }}.svc.cluster.local
search_policy: full_search
# Remove these after fixing https://wearezeta.atlassian.net/browse/WPB-3796
- domain: dyn-backend-1
search_policy: full_search
- domain: dyn-backend-2
search_policy: full_search
- domain: dyn-backend-3
search_policy: full_search
setFederationStrategy: allowAll
setFederationDomainConfigsUpdateFreq: 10
set2FACodeGenerationDelaySecs: 5
Expand Down Expand Up @@ -321,6 +306,7 @@ background-worker:
backendNotificationPusher:
pushBackoffMinWait: 1000 # 1ms
pushBackoffMaxWait: 500000 # 0.5s
remotesRefreshInterval: 500000 # 0.5s
secrets:
rabbitmq:
username: {{ .Values.rabbitmqUsername }}
Expand Down
16 changes: 0 additions & 16 deletions hack/helmfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,6 @@ releases:
value: {{ .Values.federationDomain1 }}
- name: cargohold.config.settings.federationDomain
value: {{ .Values.federationDomain1 }}
- name: brig.config.optSettings.setFederationDomainConfigs[0].domain
value: {{ .Values.federationDomain2 }}
- name: brig.config.optSettings.setFederationDomainConfigs[2].domain
value: {{ .Values.dynBackendDomain1 }}
- name: brig.config.optSettings.setFederationDomainConfigs[3].domain
value: {{ .Values.dynBackendDomain2 }}
- name: brig.config.optSettings.setFederationDomainConfigs[4].domain
value: {{ .Values.dynBackendDomain3 }}
needs:
- 'databases-ephemeral'

Expand All @@ -151,13 +143,5 @@ releases:
value: {{ .Values.federationDomain2 }}
- name: cargohold.config.settings.federationDomain
value: {{ .Values.federationDomain2 }}
- name: brig.config.optSettings.setFederationDomainConfigs[0].domain
value: {{ .Values.federationDomain1 }}
- name: brig.config.optSettings.setFederationDomainConfigs[2].domain
value: {{ .Values.dynBackendDomain1 }}
- name: brig.config.optSettings.setFederationDomainConfigs[3].domain
value: {{ .Values.dynBackendDomain2 }}
- name: brig.config.optSettings.setFederationDomainConfigs[4].domain
value: {{ .Values.dynBackendDomain3 }}
needs:
- 'databases-ephemeral'
25 changes: 1 addition & 24 deletions integration/test/SetupHelpers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import Data.Aeson hiding ((.=))
import Data.Aeson.Types qualified as Aeson
import Data.Default
import Data.Function
import Data.List qualified as List
import Data.UUID.V1 (nextUUID)
import Data.UUID.V4 (nextRandom)
import GHC.Stack
Expand Down Expand Up @@ -81,7 +80,7 @@ resetFedConns owndom = do
rdoms :: [String] <- do
rawlist <- resp.json %. "remotes" & asList
(asString . (%. "domain")) `mapM` rawlist
Internal.deleteFedConn' owndom `mapM_` rdoms
Internal.deleteFedConn owndom `mapM_` rdoms

randomId :: HasCallStack => App String
randomId = liftIO (show <$> nextRandom)
Expand All @@ -95,32 +94,10 @@ randomUserId domain = do
uid <- randomId
pure $ object ["id" .= uid, "domain" .= d]

addFullSearchFor :: [String] -> Value -> App Value
addFullSearchFor domains val =
modifyField
"optSettings.setFederationDomainConfigs"
( \configs -> do
cfg <- assertJust "" configs
xs <- cfg & asList
pure (xs <> [object ["domain" .= domain, "search_policy" .= "full_search"] | domain <- domains])
)
val

fullSearchWithAll :: ServiceOverrides
fullSearchWithAll =
def
{ brigCfg = \val -> do
ownDomain <- asString =<< val %. "optSettings.setFederationDomain"
env <- ask
let remoteDomains = List.delete ownDomain $ [env.domain1, env.domain2] <> env.dynamicDomains
addFullSearchFor remoteDomains val
}

withFederatingBackendsAllowDynamic :: HasCallStack => Int -> ((String, String, String) -> App a) -> App a
withFederatingBackendsAllowDynamic n k = do
let setFederationConfig =
setField "optSettings.setFederationStrategy" "allowDynamic"
>=> removeField "optSettings.setFederationDomainConfigs"
>=> setField "optSettings.setFederationDomainConfigsUpdateFreq" (Aeson.Number 1)
startDynamicBackends
[ def {brigCfg = setFederationConfig},
Expand Down
54 changes: 16 additions & 38 deletions integration/test/Test/Brig.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,8 @@ testSearchContactForExternalUsers = do
testCrudFederationRemotes :: HasCallStack => App ()
testCrudFederationRemotes = do
otherDomain <- asString OtherDomain
let overrides =
def
{ brigCfg =
setField
"optSettings.setFederationDomainConfigs"
[object ["domain" .= otherDomain, "search_policy" .= "full_search"]]
}
withModifiedBackend overrides $ \ownDomain -> do
withModifiedBackend def $ \ownDomain -> do
void $ Internal.createFedConn ownDomain (Internal.FedConn otherDomain "full_search")
let parseFedConns :: HasCallStack => Response -> App [Value]
parseFedConns resp =
-- Pick out the list of federation domain configs
Expand All @@ -52,23 +46,13 @@ testCrudFederationRemotes = do
res2 <- parseFedConns =<< Internal.readFedConns ownDomain
sort res2 `shouldMatch` sort want

addFail :: HasCallStack => MakesValue fedConn => fedConn -> App ()
addFail fedConn = do
bindResponse (Internal.createFedConn' ownDomain fedConn) $ \res -> do
addFailureContext ("res = " <> show res) $ res.status `shouldMatchInt` 533

deleteOnce :: (Ord fedConn, ToJSON fedConn, MakesValue fedConn) => String -> [fedConn] -> App ()
deleteOnce domain want = do
bindResponse (Internal.deleteFedConn ownDomain domain) $ \res -> do
addFailureContext ("res = " <> show res) $ res.status `shouldMatchInt` 200
res2 <- parseFedConns =<< Internal.readFedConns ownDomain
sort res2 `shouldMatch` sort want

deleteFail :: HasCallStack => String -> App ()
deleteFail del = do
bindResponse (Internal.deleteFedConn' ownDomain del) $ \res -> do
addFailureContext ("res = " <> show res) $ res.status `shouldMatchInt` 533

updateOnce :: (MakesValue fedConn, Ord fedConn2, ToJSON fedConn2, MakesValue fedConn2, HasCallStack) => String -> fedConn -> [fedConn2] -> App ()
updateOnce domain fedConn want = do
bindResponse (Internal.updateFedConn ownDomain domain fedConn) $ \res -> do
Expand All @@ -86,33 +70,28 @@ testCrudFederationRemotes = do

let remote1, remote1', remote1'' :: Internal.FedConn
remote1 = Internal.FedConn dom1 "no_search"
remote1' = remote1 {Internal.searchStrategy = "full_search"}
remote1'' = remote1 {Internal.domain = dom2}

cfgRemotesExpect :: Internal.FedConn
cfgRemotesExpect = Internal.FedConn (cs otherDomain) "full_search"
remote1' = Internal.FedConn dom1 "full_search"
remote1'' = Internal.FedConn dom2 "exact_handle_search"

remote1J <- make remote1
remote1J' <- make remote1'
remote1J'' <- make remote1''

resetFedConns ownDomain
cfgRemotes <- parseFedConns =<< Internal.readFedConns ownDomain
cfgRemotes `shouldMatch` [cfgRemotesExpect]
-- entries present in the config file can be idempotently added if identical, but cannot be
-- updated, deleted or updated.
addOnce cfgRemotesExpect [cfgRemotesExpect]
addFail (cfgRemotesExpect {Internal.searchStrategy = "no_search"})
deleteFail (Internal.domain cfgRemotesExpect)
updateFail (Internal.domain cfgRemotesExpect) (cfgRemotesExpect {Internal.searchStrategy = "no_search"})
-- create
addOnce remote1 $ (remote1J : cfgRemotes)
addOnce remote1 $ (remote1J : cfgRemotes) -- idempotency
addOnce remote1 [remote1J]
addOnce remote1 [remote1J] -- idempotency
addOnce remote1'' [remote1J, remote1J'']
-- update
updateOnce (Internal.domain remote1) remote1' (remote1J' : cfgRemotes)
updateFail (Internal.domain remote1) remote1''
updateOnce (Internal.domain remote1) remote1' [remote1J', remote1J'']
updateOnce (Internal.domain remote1) remote1' [remote1J', remote1J''] -- idempotency
updateFail (Internal.domain remote1) remote1'' -- existing entries can't change domain
-- delete
deleteOnce (Internal.domain remote1) cfgRemotes
deleteOnce (Internal.domain remote1) cfgRemotes -- idempotency
deleteOnce (Internal.domain remote1) [remote1J'']
deleteOnce (Internal.domain remote1) [remote1J''] -- idempotency
-- reset
resetFedConns ownDomain
deleteOnce (Internal.domain remote1) ([] :: [Internal.FedConn])

testCrudOAuthClient :: HasCallStack => App ()
testCrudOAuthClient = do
Expand Down Expand Up @@ -185,7 +164,6 @@ testRemoteUserSearch :: HasCallStack => App ()
testRemoteUserSearch = do
let overrides =
setField "optSettings.setFederationStrategy" "allowDynamic"
>=> removeField "optSettings.setFederationDomainConfigs"
>=> setField "optSettings.setFederationDomainConfigsUpdateFreq" (Aeson.Number 1)
startDynamicBackends [def {brigCfg = overrides}, def {brigCfg = overrides}] $ \dynDomains -> do
domains@[d1, d2] <- pure dynDomains
Expand Down
Loading