2021-11-09 07:15:49 -05:00
|
|
|
name: mjolnir
|
2022-02-09 02:40:33 -05:00
|
|
|
|
2021-10-07 08:42:08 -04:00
|
|
|
up:
|
2021-11-18 08:54:46 -05:00
|
|
|
before:
|
|
|
|
# Launch the reverse proxy, listening for connections *only* on the local host.
|
|
|
|
- docker run --rm --network host --name mjolnir-test-reverse-proxy -p 127.0.0.1:8081:80 -v $MX_TEST_CWD/test/nginx.conf:/etc/nginx/nginx.conf:ro -d nginx
|
2022-01-07 06:13:50 -05:00
|
|
|
after:
|
|
|
|
# Wait until Synapse is ready
|
|
|
|
- until curl localhost:9999 --stderr /dev/null > /dev/null; do echo "Waiting for Synapse..."; sleep 1s; done
|
|
|
|
- echo "Synapse is ready"
|
|
|
|
|
2021-09-27 07:12:20 -04:00
|
|
|
run:
|
2021-10-07 08:42:08 -04:00
|
|
|
- yarn test:integration
|
2022-02-09 02:40:33 -05:00
|
|
|
|
2021-10-07 08:42:08 -04:00
|
|
|
down:
|
|
|
|
finally:
|
2021-11-09 07:15:49 -05:00
|
|
|
- docker stop mjolnir-test-reverse-proxy || true
|
2022-02-09 02:40:33 -05:00
|
|
|
|
|
|
|
modules:
|
|
|
|
- name: mjolnir
|
|
|
|
build:
|
|
|
|
- cp -r synapse_antispam $MX_TEST_MODULE_DIR
|
|
|
|
config:
|
|
|
|
module: mjolnir.Module
|
|
|
|
config: {}
|
|
|
|
|
|
|
|
|
2021-11-09 07:15:49 -05:00
|
|
|
homeserver:
|
2022-01-06 10:11:24 -05:00
|
|
|
# Basic configuration.
|
2021-09-27 07:12:20 -04:00
|
|
|
server_name: localhost:9999
|
|
|
|
public_baseurl: http://localhost:9999
|
2021-11-09 07:15:49 -05:00
|
|
|
registration_shared_secret: REGISTRATION_SHARED_SECRET
|
2022-01-18 06:34:38 -05:00
|
|
|
# Make manual testing easier
|
|
|
|
enable_registration: true
|
2022-01-06 10:11:24 -05:00
|
|
|
|
2022-01-25 07:19:44 -05:00
|
|
|
# We remove rc_message so we can test rate limiting,
|
|
|
|
# but we keep the others because of https://github.com/matrix-org/synapse/issues/11785
|
|
|
|
# and we don't want to slow integration tests down.
|
2022-01-06 10:11:24 -05:00
|
|
|
rc_registration:
|
|
|
|
per_second: 10000
|
|
|
|
burst_count: 10000
|
|
|
|
|
|
|
|
rc_login:
|
|
|
|
address:
|
|
|
|
per_second: 10000
|
|
|
|
burst_count: 10000
|
|
|
|
account:
|
|
|
|
per_second: 10000
|
|
|
|
burst_count: 10000
|
|
|
|
failed_attempts:
|
|
|
|
per_second: 10000
|
|
|
|
burst_count: 10000
|
|
|
|
|
|
|
|
rc_admin_redaction:
|
|
|
|
per_second: 10000
|
|
|
|
burst_count: 10000
|
|
|
|
|
|
|
|
rc_joins:
|
|
|
|
local:
|
|
|
|
per_second: 10000
|
|
|
|
burst_count: 10000
|
|
|
|
remote:
|
|
|
|
per_second: 10000
|
|
|
|
burst_count: 10000
|