mirror of
https://github.com/matrix-org/sliding-sync.git
synced 2025-03-10 13:37:11 +00:00
Return a dummy /versions response in tests
Otherwise every integration test logs a warning that isn't useful.
This commit is contained in:
parent
6fe9b18f8c
commit
1079ec6aed
@ -243,6 +243,10 @@ func runTestV2Server(t testutils.TestBenchInterface) *testV2Server {
|
||||
timeToWaitForV2Response: time.Second,
|
||||
}
|
||||
r := mux.NewRouter()
|
||||
r.HandleFunc("/_matrix/client/versions", func(w http.ResponseWriter, req *http.Request) {
|
||||
w.WriteHeader(200)
|
||||
w.Write([]byte(`{"versions": ["v1.1"]}`))
|
||||
})
|
||||
r.HandleFunc("/_matrix/client/r0/account/whoami", func(w http.ResponseWriter, req *http.Request) {
|
||||
token := strings.TrimPrefix(req.Header.Get("Authorization"), "Bearer ")
|
||||
userID := server.userID(token)
|
||||
|
Loading…
x
Reference in New Issue
Block a user