Add Sytest/Complement coverage to scheduled runs (#2962)

This adds Sytest and Complement coverage reporting to the nightly
scheduled CI runs.

Fixes a few API mode related issues as well, since we seemingly never
really ran them with Complement.

Also fixes a bug related to device list changes: When we pass in an
empty `newlyLeftRooms` slice, we got a list of all currently joined
rooms with the corresponding members. When we then got the
`newlyJoinedRooms`, we wouldn't update the `changed` slice, because we
already got the user from the `newlyLeftRooms` query. This is fixed by
simply ignoring empty `newlyLeftRooms`.
This commit is contained in:
Till 2023-02-03 13:42:35 +01:00 committed by GitHub
parent 9c826d064d
commit baf118b08c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 253 additions and 40 deletions

View file

@ -18,6 +18,7 @@ import (
"net/http"
"github.com/matrix-org/dendrite/clientapi/jsonerror"
"github.com/matrix-org/dendrite/internal/httputil"
roomserverAPI "github.com/matrix-org/dendrite/roomserver/api"
"github.com/matrix-org/dendrite/userapi/api"
"github.com/matrix-org/util"
@ -44,6 +45,15 @@ func LeaveRoomByID(
JSON: jsonerror.LeaveServerNoticeError(),
}
}
switch e := err.(type) {
case httputil.InternalAPIError:
if e.Message == jsonerror.LeaveServerNoticeError().Error() {
return util.JSONResponse{
Code: http.StatusForbidden,
JSON: jsonerror.LeaveServerNoticeError(),
}
}
}
return util.JSONResponse{
Code: http.StatusBadRequest,
JSON: jsonerror.Unknown(err.Error()),