summary refs log tree commit diff
path: root/scripts-dev
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-10-21 14:53:14 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2020-10-21 14:53:14 +0100
commitab26b5894a3720cac4daa0daf47ed08d29c4356e (patch)
tree2044b1fabe9cdeb96d1195beef09498b95b21509 /scripts-dev
parentMerge commit '31acc5c30' into anoa/dinsic_release_1_21_x (diff)
parentMerge branch 'develop' of github.com:matrix-org/synapse into anoa/info-mainli... (diff)
downloadsynapse-ab26b5894a3720cac4daa0daf47ed08d29c4356e.tar.xz
Merge commit 'f43c66d23' into anoa/dinsic_release_1_21_x
* commit 'f43c66d23':
  Add support for running Complement against the local checkout (#8317)
  Filter out appservices from mau count (#8404)
  Only assert valid next_link params when provided (#8417)
  Add metrics to track success/otherwise of replication requests (#8406)
  Fix handling of connection timeouts in outgoing http requests (#8400)
  Changelog
  Don't check whether a 3pid is allowed to register during password reset
  Add checks for postgres sequence consistency (#8402)
  Create a mechanism for marking tests "logcontext clean" (#8399)
  Add `ui_auth_sessions_ips` table to `synapse_port_db` ignore list (#8410)
  A pair of tiny cleanups in the federation request code. (#8401)
  typo
Diffstat (limited to 'scripts-dev')
-rwxr-xr-xscripts-dev/complement.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts-dev/complement.sh b/scripts-dev/complement.sh
new file mode 100755
index 0000000000..3cde53f5c0
--- /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