Files
matrix-rust-sdk/testing/matrix-sdk-integration-testing
Benjamin Bouvier 3693c582c3 integration tests: update reactions test to check if an event is a local echo
The test relied on the fact that sending an event from a given timeline
is not observable from another timeline. Indeed, it sent a message using
a first timeline object, then constructed a second timeline object and
expected only the remote event to be in there.

Now, the sending queue is shared across all instances of a Room, thus
all instances of a Timeline, and the second timeline can see the local
echo for the message sent by the first timeline.

The "fix" is thus in the test structure itself: when waiting for the
remote echo to be there, check that the timeline item doesn't pertain to
a local echo, i.e. is a remote echo.
2024-06-05 14:58:41 +02:00
..

Matrix SDK integration test

Requirements

This requires a synapse backend with a ci patched configuration. You can easily get it up and running with docker compose via:

docker compose -f assets/docker-compose.yml up -d
docker compose -f assets/docker-compose.yml logs --tail 100 -f

Note that this works also with podman compose.

Patches You can see the patches we do to configuration (namely activate registration and resetting rate limits), check out what assets/ci-start.sh changes.

Running

The integration tests can be run with cargo test or cargo nextest run.

The integration tests expect the environment variables HOMESERVER_URL to be the HTTP URL to access the synapse server and HOMESERVER_DOMAIN to be set to the domain configured in that server. If you are using the provided docker-compose.yml, the default will be fine.

Maintenance

To drop the database of your docker compose run:

docker compose -f assets/docker-compose.yml down --volumes