diff --git a/clientapi/routing/state_test.go b/clientapi/routing/state_test.go index cc4af9660..7825f9247 100644 --- a/clientapi/routing/state_test.go +++ b/clientapi/routing/state_test.go @@ -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,