Skip to content

Commit

Permalink
Use signatures in remaining helpers to start different test workers
Browse files Browse the repository at this point in the history
  • Loading branch information
Martchus committed Aug 26, 2024
1 parent 8d7b9a5 commit b3bddcd
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions t/lib/OpenQA/Test/Utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,7 @@ sub setup_worker { # uncoverable statement
$worker->log_setup_info; # uncoverable statement
}

sub start_worker {
my ($connect_args) = @_;
sub start_worker ($connect_args) {
my $os_autoinst_path = '../os-autoinst';
my $isotovideo_path = $os_autoinst_path . '/isotovideo';

Expand Down Expand Up @@ -439,21 +438,15 @@ sub unstable_worker ($apikey, $apisecret, $host, $instance, $ticks, $sleep = und
return $h;
}

sub unresponsive_worker {
my ($apikey, $apisecret, $host, $instance) = @_;

sub unresponsive_worker ($apikey, $apisecret, $host, $instance) {
note("Starting unresponsive worker. Instance: $instance for host $host");
c_worker($apikey, $apisecret, $host, $instance, 1);
}
sub broken_worker {
my ($apikey, $apisecret, $host, $instance, $error) = @_;

sub broken_worker ($apikey, $apisecret, $host, $instance, $error) {
note("Starting broken worker. Instance: $instance for host $host");
c_worker($apikey, $apisecret, $host, $instance, 0, error => $error);
}
sub rejective_worker {
my ($apikey, $apisecret, $host, $instance, $reason) = @_;

sub rejective_worker ($apikey, $apisecret, $host, $instance, $reason) {
note("Starting rejective worker. Instance: $instance for host $host");
c_worker($apikey, $apisecret, $host, $instance, 1, rejection_reason => $reason);
}
Expand Down

0 comments on commit b3bddcd

Please sign in to comment.