Add tracing test?

This commit is contained in:
Till Faelligen 2022-12-09 15:47:38 +01:00
parent 62061a7890
commit f22ebda1f5
No known key found for this signature in database
GPG key ID: ACCDC9606D472758
2 changed files with 6 additions and 1 deletions

View file

@ -20,7 +20,9 @@ type RoomserverInternalAPITrace struct {
}
func (t *RoomserverInternalAPITrace) QueryLeftUsers(ctx context.Context, req *QueryLeftUsersRequest, res *QueryLeftUsersResponse) error {
return t.Impl.QueryLeftUsers(ctx, req, res)
err := t.Impl.QueryLeftUsers(ctx, req, res)
util.GetLogger(ctx).WithError(err).Infof("QueryLeftUsers req=%+v res=%+v", js(req), js(res))
return err
}
func (t *RoomserverInternalAPITrace) SetFederationAPI(fsAPI fsAPI.RoomserverFederationAPI, keyRing *gomatrixserverlib.KeyRing) {

View file

@ -133,6 +133,9 @@ func Test_QueryLeftUsers(t *testing.T) {
})
t.Run("Monolith", func(t *testing.T) {
testCase(rsAPI)
// also test tracing
traceAPI := &api.RoomserverInternalAPITrace{Impl: rsAPI}
testCase(traceAPI)
})
})