aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--[-rwxr-xr-x]autotests/adjust-config.sh (renamed from .ci/adjust-config.sh)20
-rwxr-xr-xautotests/run-tests.sh30
2 files changed, 25 insertions, 25 deletions
diff --git a/.ci/adjust-config.sh b/autotests/adjust-config.sh
index b2ca52b2..a55ac670 100755..100644
--- a/.ci/adjust-config.sh
+++ b/autotests/adjust-config.sh
@@ -3,9 +3,9 @@
CMD=""
$CMD perl -pi -w -e \
- 's/rc_messages_per_second.*/rc_messages_per_second: 1000/g;' data/homeserver.yaml
+ '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;' data/homeserver.yaml
+ 's/rc_message_burst_count.*/rc_message_burst_count: 10000/g;' homeserver.yaml
(
cat <<HEREDOC
@@ -39,15 +39,17 @@ HEREDOC
) | $CMD tee -a data/homeserver.yaml
$CMD perl -pi -w -e \
- 's/#enable_registration: false/enable_registration: true/g;' data/homeserver.yaml
+ 's/^#enable_registration: false/enable_registration: true/g;' homeserver.yaml
$CMD perl -pi -w -e \
- 's/tls: false/tls: true/g;' data/homeserver.yaml
+ 's/^#enable_registration_without_verification: .+/enable_registration_without_verification: true/g;' homeserver.yaml
$CMD perl -pi -w -e \
- 's/#tls_certificate_path:/tls_certificate_path:/g;' data/homeserver.yaml
+ 's/tls: false/tls: true/g;' homeserver.yaml
$CMD perl -pi -w -e \
- 's/#tls_private_key_path:/tls_private_key_path:/g;' data/homeserver.yaml
+ 's/#tls_certificate_path:/tls_certificate_path:/g;' homeserver.yaml
+$CMD perl -pi -w -e \
+ 's/#tls_private_key_path:/tls_private_key_path:/g;' homeserver.yaml
-$CMD openssl req -x509 -newkey rsa:4096 -keyout data/localhost.tls.key -out data/localhost.tls.crt -days 365 -subj '/CN=localhost' -nodes
+$CMD openssl req -x509 -newkey rsa:4096 -keyout localhost.tls.key -out localhost.tls.crt -days 365 -subj '/CN=localhost' -nodes
-$CMD chmod 0777 data/localhost.tls.crt
-$CMD chmod 0777 data/localhost.tls.key
+$CMD chmod 0777 localhost.tls.crt
+$CMD chmod 0777 localhost.tls.key
diff --git a/autotests/run-tests.sh b/autotests/run-tests.sh
index 0d58e460..a3ee2ade 100755
--- a/autotests/run-tests.sh
+++ b/autotests/run-tests.sh
@@ -1,34 +1,32 @@
mkdir -p data
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:v1.24.0 generate
-./.ci/adjust-config.sh
+ -e SYNAPSE_SERVER_NAME=localhost -e SYNAPSE_REPORT_STATS=no matrixdotorg/synapse:latest generate
+pushd data
+. ../autotests/adjust-config.sh
+popd
docker run -d \
--name synapse \
-p 1234:8008 \
-p 8448:8008 \
-p 8008:8008 \
- -v `pwd`/data:/data matrixdotorg/synapse:v1.24.0
+ -v `pwd`/data:/data matrixdotorg/synapse:latest
trap "rm -rf ./data/*; docker rm -f synapse 2>&1 >/dev/null; trap - EXIT" EXIT
echo Waiting for synapse to start...
until curl -s -f -k https://localhost:1234/_matrix/client/versions; do echo "Checking ..."; sleep 2; done
echo Register alice
-docker exec synapse /bin/sh -c 'register_new_matrix_user --admin -u alice1 -p secret -c /data/homeserver.yaml https://localhost:8008'
-docker exec synapse /bin/sh -c 'register_new_matrix_user --admin -u alice2 -p secret -c /data/homeserver.yaml https://localhost:8008'
-docker exec synapse /bin/sh -c 'register_new_matrix_user --admin -u alice3 -p secret -c /data/homeserver.yaml https://localhost:8008'
-docker exec synapse /bin/sh -c 'register_new_matrix_user --admin -u alice4 -p secret -c /data/homeserver.yaml https://localhost:8008'
-docker exec synapse /bin/sh -c 'register_new_matrix_user --admin -u alice5 -p secret -c /data/homeserver.yaml https://localhost:8008'
-docker exec synapse /bin/sh -c 'register_new_matrix_user --admin -u alice6 -p secret -c /data/homeserver.yaml https://localhost:8008'
-docker exec synapse /bin/sh -c 'register_new_matrix_user --admin -u alice7 -p secret -c /data/homeserver.yaml https://localhost:8008'
-docker exec synapse /bin/sh -c 'register_new_matrix_user --admin -u alice8 -p secret -c /data/homeserver.yaml https://localhost:8008'
-docker exec synapse /bin/sh -c 'register_new_matrix_user --admin -u alice9 -p secret -c /data/homeserver.yaml https://localhost:8008'
+for i in 1 2 3 4 5 6 7 8 9; do
+ docker exec synapse /bin/sh -c "register_new_matrix_user --admin -u alice$i -p secret -c /data/homeserver.yaml https://localhost:8008"
+done
echo Register bob
-docker exec synapse /bin/sh -c 'register_new_matrix_user --admin -u bob1 -p secret -c /data/homeserver.yaml https://localhost:8008'
-docker exec synapse /bin/sh -c 'register_new_matrix_user --admin -u bob2 -p secret -c /data/homeserver.yaml https://localhost:8008'
-docker exec synapse /bin/sh -c 'register_new_matrix_user --admin -u bob3 -p secret -c /data/homeserver.yaml https://localhost:8008'
+for i in 1 2 3; do
+ docker exec synapse /bin/sh -c "register_new_matrix_user --admin -u bob$i -p secret -c /data/homeserver.yaml https://localhost:8008"
+done
echo Register carl
-docker exec synapse /bin/sh -c 'register_new_matrix_user --admin -u carl -p secret -c /data/homeserver.yaml https://localhost:8008'
+docker exec synapse /bin/sh -c "register_new_matrix_user --admin -u carl -p secret -c /data/homeserver.yaml https://localhost:8008"
GTEST_COLOR=1 ctest --verbose "$@"
+