mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-14 05:12:26 +03:00
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:
parent
985298cfc4
commit
3691423626
58 changed files with 692 additions and 234 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue