From f14200e50d697c5e827f1bdc8b0e78d842fd5f8c Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 29 May 2024 17:43:12 -0700 Subject: [PATCH] Update cockpit autoupdate test for new dnf5 service The service cockpit enables is different when it detects dnf5, since cockpit 317. Let's just make this an F40/F41 boundary thing, and add the cockpit 317 update as a workaround for F41 until it goes stable. Signed-off-by: Adam Williamson --- lib/utils.pm | 2 +- tests/server_cockpit_autoupdate.pm | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/utils.pm b/lib/utils.pm index 7b6ac366..221f371f 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -477,7 +477,7 @@ sub get_workarounds { "38" => [], "39" => [], "40" => [], - "41" => [], + "41" => ["FEDORA-2024-fa260c31e8"], ); my $advortasks = $workarounds{$version}; return @$advortasks; diff --git a/tests/server_cockpit_autoupdate.pm b/tests/server_cockpit_autoupdate.pm index 883cd056..2d01ba7a 100644 --- a/tests/server_cockpit_autoupdate.pm +++ b/tests/server_cockpit_autoupdate.pm @@ -32,11 +32,14 @@ sub run { # Quit Cockpit quit_firefox; - # Check that the dnf-automatic service has started - assert_script_run "systemctl is-active dnf-automatic-install.timer"; + # this is a dnf4 vs. dnf5 thing + my $relnum = get_release_number; + my $service = $relnum > 40 ? "dnf5-automatic" : "dnf-automatic-install"; + # Check that the service has started + assert_script_run "systemctl is-active ${service}.timer"; # Check that it is scheduled correctly - validate_script_output "systemctl show dnf-automatic-install.timer | grep TimersCalendar", sub { $_ =~ "06:00:00" }; + validate_script_output "systemctl show ${service}.timer | grep TimersCalendar", sub { $_ =~ "06:00:00" }; } sub test_flags {