From df128b5bcbca0ae8adc61b0c8619223396ae7382 Mon Sep 17 00:00:00 2001 From: Sam Wedgwood Date: Wed, 16 Aug 2023 16:48:01 +0100 Subject: [PATCH] fix test --- clientapi/routing/state_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) 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,