diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2020-09-29 14:21:41 +0100 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2020-09-29 14:21:41 +0100 |
commit | f43c66d23b5639706bf5aca36ac5089311fac196 (patch) | |
tree | 37b68842bc8c607262c3875f9ecf2cef75e63c4c /scripts-dev/complement.sh | |
parent | Changelog (diff) | |
parent | Add support for running Complement against the local checkout (#8317) (diff) | |
download | synapse-f43c66d23b5639706bf5aca36ac5089311fac196.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into anoa/info-mainline-no-check-password-reset
Diffstat (limited to 'scripts-dev/complement.sh')
-rwxr-xr-x | scripts-dev/complement.sh | 22 |
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 |