refactor: use latest GMSL which splits fed client from matrix room logic (#3051)

Part of a series of refactors on GMSL.
This commit is contained in:
kegsay 2023-04-06 09:55:01 +01:00 committed by GitHub
parent e093005bc2
commit 0db43f13a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
86 changed files with 493 additions and 414 deletions

View file

@ -20,6 +20,7 @@ import (
"testing"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/gomatrixserverlib/fclient"
"github.com/sirupsen/logrus"
"gopkg.in/yaml.v2"
)
@ -275,7 +276,7 @@ func Test_SigningIdentityFor(t *testing.T) {
name string
virtualHosts []*VirtualHost
serverName gomatrixserverlib.ServerName
want *gomatrixserverlib.SigningIdentity
want *fclient.SigningIdentity
wantErr bool
}{
{
@ -290,23 +291,23 @@ func Test_SigningIdentityFor(t *testing.T) {
{
name: "found identity",
serverName: gomatrixserverlib.ServerName("main"),
want: &gomatrixserverlib.SigningIdentity{ServerName: "main"},
want: &fclient.SigningIdentity{ServerName: "main"},
},
{
name: "identity found on virtual hosts",
serverName: gomatrixserverlib.ServerName("vh2"),
virtualHosts: []*VirtualHost{
{SigningIdentity: gomatrixserverlib.SigningIdentity{ServerName: "vh1"}},
{SigningIdentity: gomatrixserverlib.SigningIdentity{ServerName: "vh2"}},
{SigningIdentity: fclient.SigningIdentity{ServerName: "vh1"}},
{SigningIdentity: fclient.SigningIdentity{ServerName: "vh2"}},
},
want: &gomatrixserverlib.SigningIdentity{ServerName: "vh2"},
want: &fclient.SigningIdentity{ServerName: "vh2"},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
c := &Global{
VirtualHosts: tt.virtualHosts,
SigningIdentity: gomatrixserverlib.SigningIdentity{
SigningIdentity: fclient.SigningIdentity{
ServerName: "main",
},
}