Skip to content
Snippets Groups Projects
README-testing.md 6.03 KiB

Running tests against a dockerised Synapse

It's possible to run integration tests against Synapse using Complement. Complement is a Matrix Spec compliance test suite for homeservers, and supports any homeserver docker image configured to listen on ports 8008/8448. This document contains instructions for building Synapse docker images that can be run inside Complement for testing purposes.

Note that running Synapse's unit tests from within the docker image is not supported.

Testing with SQLite and single-process Synapse

Note that scripts-dev/complement.sh is a script that will automatically build and run an SQLite-based, single-process of Synapse against Complement.

The instructions below will set up Complement testing for a single-process, SQLite-based Synapse deployment.

Start by building the base Synapse docker image. If you wish to run tests with the latest release of Synapse, instead of your current checkout, you can skip this step. From the root of the repository:

docker build -t matrixdotorg/synapse -f docker/Dockerfile .

This will build an image with the tag matrixdotorg/synapse.

Next, build the Synapse image for Complement.