atagen

matrix-rust-sdk

public
Star0
Watch0
ssh://brewery@pls.lobotomise.me:33/atagen/matrix-rust-sdk.git

Blame: testing/matrix-sdk-integration-testing/README.md

7ff8adafe9e4atagen2026-10-22 12:30 UTC1
# Matrix SDK integration test
7ff8adafe9e4atagen2026-10-22 12:30 UTC2
7ff8adafe9e4atagen2026-10-22 12:30 UTC3
This set of tests requires a Synapse instance, and it runs the tests from this
7ff8adafe9e4atagen2026-10-22 12:30 UTC4
directory against this real-world server. As a result, these tests depend on the
7ff8adafe9e4atagen2026-10-22 12:30 UTC5
load of the machine/server, and as such they might be more sensitive to timing
7ff8adafe9e4atagen2026-10-22 12:30 UTC6
issues than other tests in the code base.
7ff8adafe9e4atagen2026-10-22 12:30 UTC7
7ff8adafe9e4atagen2026-10-22 12:30 UTC8
## Requirements
7ff8adafe9e4atagen2026-10-22 12:30 UTC9
7ff8adafe9e4atagen2026-10-22 12:30 UTC10
This requires a synapse backend with a configuration patched for CI. You can get
7ff8adafe9e4atagen2026-10-22 12:30 UTC11
it up and running with `docker compose` via:
7ff8adafe9e4atagen2026-10-22 12:30 UTC12
7ff8adafe9e4atagen2026-10-22 12:30 UTC13
```sh
7ff8adafe9e4atagen2026-10-22 12:30 UTC14
docker compose -f assets/docker-compose.yml up -d
7ff8adafe9e4atagen2026-10-22 12:30 UTC15
docker compose -f assets/docker-compose.yml logs --tail 100 -f
7ff8adafe9e4atagen2026-10-22 12:30 UTC16
```
7ff8adafe9e4atagen2026-10-22 12:30 UTC17
7ff8adafe9e4atagen2026-10-22 12:30 UTC18
Note that this works also with `podman compose`.
7ff8adafe9e4atagen2026-10-22 12:30 UTC19
7ff8adafe9e4atagen2026-10-22 12:30 UTC20
**Patches** You can see the patches we do to configuration (namely activate
7ff8adafe9e4atagen2026-10-22 12:30 UTC21
registration and resetting rate limits, enable a few experimental features),
7ff8adafe9e4atagen2026-10-22 12:30 UTC22
check out what `assets/ci-start.sh` changes.
7ff8adafe9e4atagen2026-10-22 12:30 UTC23
7ff8adafe9e4atagen2026-10-22 12:30 UTC24
## Running
7ff8adafe9e4atagen2026-10-22 12:30 UTC25
7ff8adafe9e4atagen2026-10-22 12:30 UTC26
The integration tests can be run with `cargo test` or `cargo nextest run`.
7ff8adafe9e4atagen2026-10-22 12:30 UTC27
7ff8adafe9e4atagen2026-10-22 12:30 UTC28
The integration tests expect the environment variables `HOMESERVER_URL` to be
7ff8adafe9e4atagen2026-10-22 12:30 UTC29
the HTTP URL to access the synapse server and `HOMESERVER_DOMAIN` to be set to
7ff8adafe9e4atagen2026-10-22 12:30 UTC30
the domain configured in that server. These variables are set to a default value
7ff8adafe9e4atagen2026-10-22 12:30 UTC31
that matches the default `docker-compose.yml` template; if you haven't touched
7ff8adafe9e4atagen2026-10-22 12:30 UTC32
it, you don't need to manually set those environment variables.
7ff8adafe9e4atagen2026-10-22 12:30 UTC33
7ff8adafe9e4atagen2026-10-22 12:30 UTC34
## Maintenance
7ff8adafe9e4atagen2026-10-22 12:30 UTC35
7ff8adafe9e4atagen2026-10-22 12:30 UTC36
### Delete all instance data
7ff8adafe9e4atagen2026-10-22 12:30 UTC37
7ff8adafe9e4atagen2026-10-22 12:30 UTC38
To stop the services and drop the database of your docker-compose cluster, run:
7ff8adafe9e4atagen2026-10-22 12:30 UTC39
7ff8adafe9e4atagen2026-10-22 12:30 UTC40
```bash
7ff8adafe9e4atagen2026-10-22 12:30 UTC41
docker compose -f assets/docker-compose.yml down --volumes --remove-orphans -t 0
7ff8adafe9e4atagen2026-10-22 12:30 UTC42
```
7ff8adafe9e4atagen2026-10-22 12:30 UTC43
7ff8adafe9e4atagen2026-10-22 12:30 UTC44
### Rebuild the synapse image
7ff8adafe9e4atagen2026-10-22 12:30 UTC45
7ff8adafe9e4atagen2026-10-22 12:30 UTC46
If the Synapse image has been updated in version, you may need to rebuild the
7ff8adafe9e4atagen2026-10-22 12:30 UTC47
custom Synapse image using the following:
7ff8adafe9e4atagen2026-10-22 12:30 UTC48
7ff8adafe9e4atagen2026-10-22 12:30 UTC49
```bash
7ff8adafe9e4atagen2026-10-22 12:30 UTC50
docker compose -f assets/docker-compose.yml build --pull synapse
7ff8adafe9e4atagen2026-10-22 12:30 UTC51
```
7ff8adafe9e4atagen2026-10-22 12:30 UTC52
7ff8adafe9e4atagen2026-10-22 12:30 UTC53
Then restart the synapse service:
7ff8adafe9e4atagen2026-10-22 12:30 UTC54
7ff8adafe9e4atagen2026-10-22 12:30 UTC55
```bash
7ff8adafe9e4atagen2026-10-22 12:30 UTC56
docker compose -f assets/docker-compose.yml up -d synapse
7ff8adafe9e4atagen2026-10-22 12:30 UTC57
```