Skip to content

Commit

Permalink
WIP TestCase: run magic much earlier
Browse files Browse the repository at this point in the history
this allows the want->needs mappings to work, but all the "magic attribute
sets config..." logging now happens at cassandane startup instead of when
the test actually runs, which is pretty annoying
  • Loading branch information
elliefm committed Sep 16, 2024
1 parent a5c8424 commit 044590f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cassandane/Cassandane/Cyrus/TestCase.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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}};

Expand Down

0 comments on commit 044590f

Please sign in to comment.