diff --git a/cassandane/Cassandane/Cyrus/TestCase.pm b/cassandane/Cassandane/Cyrus/TestCase.pm index e120747e3c..c3cbe4ea85 100644 --- a/cassandane/Cassandane/Cyrus/TestCase.pm +++ b/cassandane/Cassandane/Cyrus/TestCase.pm @@ -139,6 +139,13 @@ sub new $self->want($name, $value) if $value; } + # initialise config and run magic early, so needs are determined before + # we try to use them to skip tests whose features are missing + my $config = $self->{_instance_params}->{config} + || Cassandane::Config->default(); + $self->{_config} = $config->clone(); + $self->_run_magic(); + return $self; } @@ -585,11 +592,6 @@ sub _create_instances my $backend2_service_port; my $backupd_port; - $self->{_config} = $self->{_instance_params}->{config} || Cassandane::Config->default(); - $self->{_config} = $self->{_config}->clone(); - - $self->_run_magic(); - my $want = $self->{_want}; my %instance_params = %{$self->{_instance_params}};