Project

General

Profile

Actions

action #107230

closed

coordination #90086: [epic] Refactor container tests

Streamline RunArgs

Added by pdostal over 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
2022-02-22
Due date:
% Done:

0%

Estimated time:

Description

In containers, we use RunArgs to provide the runtime to the test module.
The problem is we create RunArgs in multiple locations. Example:

sub load_image_test {
    my ($runtime) = @_;
    my $args = OpenQA::Test::RunArgs->new();
    $args->{runtime} = $runtime;
    loadtest('containers/image', run_args => $args, name => "image_$runtime");
}
sub load_3rd_party_image_test {
    my ($runtime) = @_;
    my $args = OpenQA::Test::RunArgs->new();
    $args->{runtime} = $runtime;
    loadtest('containers/third_party_images', run_args => $args, name => $runtime . "_3rd_party_images");
}

There are scenarios where we call both mentioned subroutines, e.g:

load_image_test('podman');
load_3rd_party_image_test('podman');

It would be better to pass the same RunArgs to both subroutines, like:

my $args = OpenQA::Test::RunArgs->new();
$args->{runtime} = 'podman';
load_image_test($args);
load_3rd_party_image_test($args);

The implementation may of course be different.

Actions #1

Updated by jlausuch over 2 years ago

  • Status changed from New to Workable
  • Parent task set to #90086
Actions #2

Updated by pdostal about 2 years ago

  • Status changed from Workable to Resolved

Done in pr#14542.

Actions #3

Updated by pdostal about 2 years ago

  • Assignee set to pdostal
Actions

Also available in: Atom PDF