mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-06 22:43:10 -06:00
fix test
This commit is contained in:
parent
67e2c81aa7
commit
df128b5bcb
|
|
@ -3,6 +3,7 @@ package routing
|
|||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
|
|
@ -29,6 +30,15 @@ type testRoomserverAPI struct {
|
|||
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(
|
||||
ctx context.Context,
|
||||
req *rsapi.QueryLatestEventsAndStateRequest,
|
||||
|
|
|
|||
Loading…
Reference in a new issue