mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-07 15:03:09 -06:00
fix test
This commit is contained in:
parent
67e2c81aa7
commit
df128b5bcb
|
|
@ -3,6 +3,7 @@ package routing
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
|
@ -29,6 +30,15 @@ type testRoomserverAPI struct {
|
||||||
senderMapping map[string]string
|
senderMapping map[string]string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s testRoomserverAPI) QueryRoomVersionForRoom(ctx context.Context, roomID string) (gomatrixserverlib.RoomVersion, error) {
|
||||||
|
if roomID == s.roomIDStr {
|
||||||
|
return s.roomVersion, nil
|
||||||
|
} else {
|
||||||
|
s.t.Logf("room version queried for %s", roomID)
|
||||||
|
return "", fmt.Errorf("unknown room")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (s testRoomserverAPI) QueryLatestEventsAndState(
|
func (s testRoomserverAPI) QueryLatestEventsAndState(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
req *rsapi.QueryLatestEventsAndStateRequest,
|
req *rsapi.QueryLatestEventsAndStateRequest,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue