aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevon Hudson <devonhudson@librem.one>2023-05-01 21:28:10 -0600
committerDevon Hudson <devonhudson@librem.one>2023-05-01 21:28:10 -0600
commit696cbb70b8cc8d663f7bb7c7a5f25cd57ea6803e (patch)
treed7a98ec1f098c5c0d43db7fdc77100baae76c404
parentb00e272e6f2fbcafb44995aa7cb6b09b6ba8ddb6 (diff)
Pass federation API to roomserver in PurgeRoom tests
-rw-r--r--clientapi/admin_test.go4
-rw-r--r--roomserver/roomserver_test.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/clientapi/admin_test.go b/clientapi/admin_test.go
index cf1c4ef3..69a81532 100644
--- a/clientapi/admin_test.go
+++ b/clientapi/admin_test.go
@@ -142,8 +142,8 @@ func TestPurgeRoom(t *testing.T) {
// this starts the JetStream consumers
syncapi.AddPublicRoutes(processCtx, routers, cfg, cm, &natsInstance, userAPI, rsAPI, caches, caching.DisableMetrics)
- federationapi.NewInternalAPI(processCtx, cfg, cm, &natsInstance, nil, rsAPI, caches, nil, true)
- rsAPI.SetFederationAPI(nil, nil)
+ fsAPI := federationapi.NewInternalAPI(processCtx, cfg, cm, &natsInstance, nil, rsAPI, caches, nil, true)
+ rsAPI.SetFederationAPI(fsAPI, nil)
// Create the room
if err := api.SendEvents(ctx, rsAPI, api.KindNew, room.Events(), "test", "test", "test", nil, false); err != nil {
diff --git a/roomserver/roomserver_test.go b/roomserver/roomserver_test.go
index 9877dd91..4c88e12b 100644
--- a/roomserver/roomserver_test.go
+++ b/roomserver/roomserver_test.go
@@ -245,8 +245,8 @@ func TestPurgeRoom(t *testing.T) {
// this starts the JetStream consumers
syncapi.AddPublicRoutes(processCtx, routers, cfg, cm, &natsInstance, userAPI, rsAPI, caches, caching.DisableMetrics)
- federationapi.NewInternalAPI(processCtx, cfg, cm, &natsInstance, nil, rsAPI, caches, nil, true)
- rsAPI.SetFederationAPI(nil, nil)
+ fsAPI := federationapi.NewInternalAPI(processCtx, cfg, cm, &natsInstance, nil, rsAPI, caches, nil, true)
+ rsAPI.SetFederationAPI(fsAPI, nil)
// Create the room
if err = api.SendEvents(ctx, rsAPI, api.KindNew, room.Events(), "test", "test", "test", nil, false); err != nil {