0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-10-20 16:48:56 +02:00
dendrite/clientapi
Till baf118b08c
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`.
2023-02-03 13:42:35 +01:00
..
api
auth
httputil
jsonerror
producers
routing Add Sytest/Complement coverage to scheduled runs (#2962) 2023-02-03 13:42:35 +01:00
threepid
userutil
admin_test.go Add /_dendrite/admin/purgeRoom/{roomID} (#2662) 2023-01-19 21:02:32 +01:00
clientapi.go
README.md

This component roughly corresponds to "Client Room Send" and "Client Sync" on the WIRING diagram. This component produces multiple binaries.

Internals

  • HTTP routing is done using gorilla/mux and the routing paths are in the routing package.

Writers

  • Each HTTP "write operation" (/createRoom, /rooms/$room_id/send/$type, etc) is contained entirely to a single file in the writers package.
  • This file contains the request and response struct definitions, as well as a Validate() bool function to validate incoming requests.
  • The entry point for each write operation is a stand-alone function as this makes testing easier. All dependencies should be injected into this function, including server keys/name, etc.