You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This configuration should generally cover your needs. For more details about other configurations, see [documentation in the SyTest repo](https://github.com/matrix-org/sytest/blob/develop/docker/README.md).
204
204
205
205
206
+
## Run the integration tests ([Complement](https://github.com/matrix-org/complement)).
207
+
208
+
[Complement](https://github.com/matrix-org/complement) is a suite of black box tests that can be run on any homeserver implementation. It can also be thought of as end-to-end (e2e) tests.
209
+
210
+
It's often nice to develop on Synapse and write Complement tests at the same time.
211
+
Here is how to run your local Synapse checkout against your local Complement checkout.
212
+
213
+
(checkout [`complement`](https://github.com/matrix-org/complement) alongside your `synapse` checkout)
To run a specific test file, you can adjust [`scripts-dev/complement.sh`](https://github.com/matrix-org/synapse/blob/develop/scripts-dev/complement.sh) to use the `-run MyTest` syntax. The name comes from the name structure in your Complement tests. If you're unsure of the name, you can do a full run and copy it from the test output:
219
+
220
+
```sh
221
+
go test -v -tags synapse_blacklist,msc2946,msc2716,msc3083,msc2403 -count=1 $EXTRA_COMPLEMENT_ARGS ./tests -run TestBackfillingHistory
222
+
```
223
+
224
+
To run a specific test, you can specify the whole name structure:
225
+
226
+
```sh
227
+
go test -v -tags synapse_blacklist,msc2946,msc2716,msc3083,msc2403 -count=1 $EXTRA_COMPLEMENT_ARGS ./tests -run TestBackfillingHistory/parallel/Backfilled_historical_events_resolve_with_proper_state_in_correct_order
228
+
```
229
+
230
+
231
+
### Access database for homeserver after Complement test runs.
232
+
233
+
If you're curious what the database looks like after you run some tests, here are some steps to get you going in Synapse:
234
+
235
+
1. In your Complement test comment out `defer deployment.Destroy(t)` and replace with `defer time.Sleep(2 * time.Hour)` to keep the homeserver running after the tests complete
236
+
1. Start the Complement tests
237
+
1. Find the name of the container, `docker ps -f name=complement_` (this will filter for just the Compelement related Docker containers)
238
+
1. Access the container replacing the name with what you found in the previous step: `docker exec -it complement_1_hs_with_application_service.hs1_2 /bin/bash`
0 commit comments