mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-21 05:43:09 -06:00
Add URL check in test
This commit is contained in:
parent
cd19f85175
commit
01f944218d
|
|
@ -107,6 +107,12 @@ func (m *MockRoundTripper) RoundTrip(req *http.Request) (res *http.Response, err
|
||||||
return nil, fmt.Errorf("server not known: %s", req.Host)
|
return nil, fmt.Errorf("server not known: %s", req.Host)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We're intercepting /matrix/key/v2/server requests here, so check
|
||||||
|
// that the URL supplied in the request is for that.
|
||||||
|
if req.URL.Path != "/_matrix/key/v2/server" {
|
||||||
|
return nil, fmt.Errorf("unexpected request path: %s", req.URL.Path)
|
||||||
|
}
|
||||||
|
|
||||||
// Query the local keys for the server in question.
|
// Query the local keys for the server in question.
|
||||||
request := &api.QueryLocalKeysRequest{}
|
request := &api.QueryLocalKeysRequest{}
|
||||||
response := &api.QueryLocalKeysResponse{}
|
response := &api.QueryLocalKeysResponse{}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue