2019-09-10 12:59:57 +00:00
|
|
|
use base "installedtest";
|
|
|
|
use strict;
|
|
|
|
use testapi;
|
|
|
|
use utils;
|
|
|
|
use packagetest;
|
|
|
|
use cockpit;
|
|
|
|
|
|
|
|
sub run {
|
2022-07-28 20:32:57 +00:00
|
|
|
my $self = shift;
|
2019-09-10 12:59:57 +00:00
|
|
|
|
|
|
|
# Start Cockpit
|
2022-11-25 19:24:52 +00:00
|
|
|
start_cockpit(login => 1);
|
2019-09-10 12:59:57 +00:00
|
|
|
|
|
|
|
# Navigate to the Update screen
|
|
|
|
select_cockpit_update();
|
|
|
|
|
|
|
|
# Switch on automatic updates
|
|
|
|
assert_and_click 'cockpit_updates_auto', '', 120;
|
|
|
|
assert_and_click 'cockpit_updates_dnf_install', '', 120;
|
2020-12-15 17:36:45 +00:00
|
|
|
# from 234 onwards, we get a config screen here: "no updates",
|
|
|
|
# "security updates only", "all updates"
|
2021-08-09 22:09:15 +00:00
|
|
|
assert_and_click 'cockpit_updates_auto_all';
|
|
|
|
assert_and_click 'cockpit_save_changes';
|
2019-09-10 12:59:57 +00:00
|
|
|
|
|
|
|
# Check the default automatic settings Everyday at 6 o'clock.
|
|
|
|
assert_screen 'autoupdate_planned_day';
|
|
|
|
assert_screen 'autoupdate_planned_time';
|
|
|
|
|
|
|
|
# Quit Cockpit
|
2020-03-20 20:43:42 +00:00
|
|
|
quit_firefox;
|
2019-09-10 12:59:57 +00:00
|
|
|
|
2024-05-30 00:43:12 +00:00
|
|
|
# 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";
|
2019-09-10 12:59:57 +00:00
|
|
|
|
|
|
|
# Check that it is scheduled correctly
|
2024-05-30 00:43:12 +00:00
|
|
|
validate_script_output "systemctl show ${service}.timer | grep TimersCalendar", sub { $_ =~ "06:00:00" };
|
2019-09-10 12:59:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sub test_flags {
|
2022-07-28 20:32:57 +00:00
|
|
|
return {always_rolllback => 1};
|
2019-09-10 12:59:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
# vim: set sw=4 et:
|