From fc01bc08fafe82b254f7562b55209c872297fac6 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sun, 29 May 2022 08:52:20 +0200 Subject: Refresh and organise run-tests.sh/adjust-config.sh run-tests.sh now uses the latest version of Synapse and has less repetitive code; adjust-config.sh moved to autotests/ (it had nothing specific to CI, after all), works with the newest Synapse (that has an additional enable_registration_without_verification safeguard) and no more depends on the config directory being called "data" but rather should be called from inside that directory (for the case when it is used separately from run-tests.sh and the config directory is not called "data"). --- autotests/adjust-config.sh | 55 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 autotests/adjust-config.sh (limited to 'autotests/adjust-config.sh') diff --git a/autotests/adjust-config.sh b/autotests/adjust-config.sh new file mode 100644 index 00000000..a55ac670 --- /dev/null +++ b/autotests/adjust-config.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +CMD="" + +$CMD perl -pi -w -e \ + 's/rc_messages_per_second.*/rc_messages_per_second: 1000/g;' homeserver.yaml +$CMD perl -pi -w -e \ + 's/rc_message_burst_count.*/rc_message_burst_count: 10000/g;' homeserver.yaml + +( +cat < Date: Sun, 29 May 2022 23:01:09 +0200 Subject: run-tests.sh: fix weird CI failure on Linux/Clang Also fix a leftover data/ prefix in adjust-config.sh --- autotests/adjust-config.sh | 2 +- autotests/run-tests.sh | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'autotests/adjust-config.sh') diff --git a/autotests/adjust-config.sh b/autotests/adjust-config.sh index a55ac670..68ea58ab 100644 --- a/autotests/adjust-config.sh +++ b/autotests/adjust-config.sh @@ -36,7 +36,7 @@ rc_joins: per_second: 10000 burst_count: 100000 HEREDOC -) | $CMD tee -a data/homeserver.yaml +) | $CMD tee -a homeserver.yaml $CMD perl -pi -w -e \ 's/^#enable_registration: false/enable_registration: true/g;' homeserver.yaml diff --git a/autotests/run-tests.sh b/autotests/run-tests.sh index a3ee2ade..05a215af 100755 --- a/autotests/run-tests.sh +++ b/autotests/run-tests.sh @@ -4,9 +4,7 @@ chmod 0777 data rm ~/.local/share/testolmaccount -rf docker run -v `pwd`/data:/data --rm \ -e SYNAPSE_SERVER_NAME=localhost -e SYNAPSE_REPORT_STATS=no matrixdotorg/synapse:latest generate -pushd data -. ../autotests/adjust-config.sh -popd +(cd data && . ../autotests/adjust-config.sh) docker run -d \ --name synapse \ -p 1234:8008 \ -- cgit v1.2.3