diff --git a/lib/SyTest/Homeserver/Synapse.pm b/lib/SyTest/Homeserver/Synapse.pm index 1d2d9d18d..023cafee1 100644 --- a/lib/SyTest/Homeserver/Synapse.pm +++ b/lib/SyTest/Homeserver/Synapse.pm @@ -33,6 +33,7 @@ sub _init $self->{paths} = {}; $self->{dendron} = ''; + $self->{redis_host} = ''; $self->SUPER::_init( $args ); @@ -282,6 +283,11 @@ sub start limit_usage_by_mau => "true", max_mau_value => 50000000, + redis => { + enabled => $self->{redis_host} ne '', + host => $self->{redis_host}, + }, + map { defined $self->{$_} ? ( $_ => $self->{$_} ) : () } qw( @@ -653,6 +659,7 @@ sub _init $self->SUPER::_init( @_ ); $self->{dendron} = delete $args->{dendron_binary}; + $self->{redis_host} = delete $args->{redis_host}; if( my $level = delete $args->{torture_replication} ) { # torture the replication protocol a bit, to replicate bugs. diff --git a/lib/SyTest/HomeserverFactory/Synapse.pm b/lib/SyTest/HomeserverFactory/Synapse.pm index 5849e584f..49a75c7af 100644 --- a/lib/SyTest/HomeserverFactory/Synapse.pm +++ b/lib/SyTest/HomeserverFactory/Synapse.pm @@ -101,6 +101,7 @@ sub _init $self->{impl} = "SyTest::Homeserver::Synapse::ViaDendron"; $self->{args}{dendron_binary} = ""; $self->{args}{torture_replication} = 0; + $self->{args}{redis_host} = ""; } sub get_options @@ -108,8 +109,9 @@ sub get_options my $self = shift; return ( - 'dendron-binary=s' => \$self->{args}{dendron_binary}, + 'dendron-binary=s' => \$self->{args}{dendron_binary}, 'torture-replication:50' => \$self->{args}{torture_replication}, + 'redis-host=s' => \$self->{args}{redis_host}, $self->SUPER::get_options(), ); } @@ -125,6 +127,8 @@ sub print_usage --dendron-binary PATH - path to the 'dendron' binary --torture-replication[=LEVEL] - enable torturing of the replication protocol + + --redis-host HOST - if set then use redis for replication EOF } diff --git a/scripts/synapse_sytest.sh b/scripts/synapse_sytest.sh index d13c8b2d1..599e4392a 100755 --- a/scripts/synapse_sytest.sh +++ b/scripts/synapse_sytest.sh @@ -121,7 +121,7 @@ if [ -n "$OFFLINE" ]; then else # We've already created the virtualenv, but lets double check we have all # deps. - /venv/bin/pip install -q --upgrade --no-cache-dir /src + /venv/bin/pip install -q --upgrade --no-cache-dir /src[redis] /venv/bin/pip install -q --upgrade --no-cache-dir \ lxml psycopg2 coverage codecov tap.py coverage_enable_subprocess