Move GMSL client types to Dendrite (#3045)

GMSL is intended for Federation only. Sister PR to
https://github.com/matrix-org/gomatrixserverlib/pull/357
This commit is contained in:
kegsay 2023-04-04 18:16:53 +01:00 committed by GitHub
parent 985298cfc4
commit 3691423626
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
58 changed files with 692 additions and 234 deletions

View file

@ -5,7 +5,7 @@ import (
"reflect"
"testing"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/dendrite/syncapi/synctypes"
)
func Test_parseContextParams(t *testing.T) {
@ -19,28 +19,28 @@ func Test_parseContextParams(t *testing.T) {
tests := []struct {
name string
req *http.Request
wantFilter *gomatrixserverlib.RoomEventFilter
wantFilter *synctypes.RoomEventFilter
wantErr bool
}{
{
name: "no params set",
req: noParamsReq,
wantFilter: &gomatrixserverlib.RoomEventFilter{Limit: 10},
wantFilter: &synctypes.RoomEventFilter{Limit: 10},
},
{
name: "limit 2 param set",
req: limit2Req,
wantFilter: &gomatrixserverlib.RoomEventFilter{Limit: 2},
wantFilter: &synctypes.RoomEventFilter{Limit: 2},
},
{
name: "limit 10000 param set",
req: limit10000Req,
wantFilter: &gomatrixserverlib.RoomEventFilter{Limit: 100},
wantFilter: &synctypes.RoomEventFilter{Limit: 100},
},
{
name: "filter lazy_load_members param set",
req: lazyLoadReq,
wantFilter: &gomatrixserverlib.RoomEventFilter{Limit: 2, LazyLoadMembers: true},
wantFilter: &synctypes.RoomEventFilter{Limit: 2, LazyLoadMembers: true},
},
{
name: "invalid limit req",