This commit is contained in:
Boris Rybalkin 2023-03-28 21:01:05 +01:00
parent c09d548f53
commit d55a9f6db3

View file

@ -356,20 +356,21 @@ func TestRoomserverConsumerOneInvite(t *testing.T) {
})) }))
defer srv.Close() defer srv.Close()
// Create a dummy application service as := &config.ApplicationService{
cfg.AppServiceAPI.Derived.ApplicationServices = []config.ApplicationService{ ID: "someID",
{ URL: srv.URL,
ID: "someID", ASToken: "",
URL: srv.URL, HSToken: "",
ASToken: "", SenderLocalpart: "senderLocalPart",
HSToken: "", NamespaceMap: map[string][]config.ApplicationServiceNamespace{
SenderLocalpart: "senderLocalPart", "users": {{RegexpObject: regexp.MustCompile(bob.ID)}},
NamespaceMap: map[string][]config.ApplicationServiceNamespace{ "aliases": {{RegexpObject: regexp.MustCompile(room.ID)}},
"users": {{RegexpObject: regexp.MustCompile(bob.ID)}},
"aliases": {{RegexpObject: regexp.MustCompile(room.ID)}},
},
}, },
} }
as.CreateHTTPClient(cfg.AppServiceAPI.DisableTLSValidation)
// Create a dummy application service
cfg.AppServiceAPI.Derived.ApplicationServices = []config.ApplicationService{*as}
caches := caching.NewRistrettoCache(128*1024*1024, time.Hour, caching.DisableMetrics) caches := caching.NewRistrettoCache(128*1024*1024, time.Hour, caching.DisableMetrics)
// Create required internal APIs // Create required internal APIs