From 8d68ae39c17147b67d63c4a7bd82dfa1cd527c6c Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 15 Sep 2020 14:12:39 +0100 Subject: [PATCH 1/2] Add bash script to run complement against the local synapse checkout --- scripts-dev/complement.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 scripts-dev/complement.sh diff --git a/scripts-dev/complement.sh b/scripts-dev/complement.sh new file mode 100755 index 000000000000..3cde53f5c051 --- /dev/null +++ b/scripts-dev/complement.sh @@ -0,0 +1,22 @@ +#! /bin/bash -eu +# This script is designed for developers who want to test their code +# against Complement. +# +# It makes a Synapse image which represents the current checkout, +# then downloads Complement and runs it with that image. + +cd "$(dirname $0)/.." + +# Build the base Synapse image from the local checkout +docker build -t matrixdotorg/synapse:latest -f docker/Dockerfile . + +# Download Complement +wget -N https://github.com/matrix-org/complement/archive/master.tar.gz +tar -xzf master.tar.gz +cd complement-master + +# Build the Synapse image from Complement, based on the above image we just built +docker build -t complement-synapse -f dockerfiles/Synapse.Dockerfile ./dockerfiles + +# Run the tests on the resulting image! +COMPLEMENT_BASE_IMAGE=complement-synapse go test -v -count=1 ./tests From d4f4a3a335c90055f15f92342bdd32a02840d303 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 15 Sep 2020 14:18:16 +0100 Subject: [PATCH 2/2] Changelog --- changelog.d/8317.feature | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/8317.feature diff --git a/changelog.d/8317.feature b/changelog.d/8317.feature new file mode 100644 index 000000000000..f9edda099c40 --- /dev/null +++ b/changelog.d/8317.feature @@ -0,0 +1 @@ +Support testing the local Synapse checkout against the [Complement homeserver test suite](https://github.com/matrix-org/complement/). \ No newline at end of file