2019-09-10 12:59:57 +00:00
|
|
|
use base "installedtest";
|
|
|
|
use strict;
|
|
|
|
use testapi;
|
|
|
|
use utils;
|
|
|
|
use packagetest;
|
|
|
|
use cockpit;
|
|
|
|
|
|
|
|
sub run {
|
|
|
|
my $self=shift;
|
|
|
|
|
|
|
|
# Start Cockpit
|
|
|
|
start_cockpit(1);
|
|
|
|
|
|
|
|
# Navigate to the Update screen
|
|
|
|
select_cockpit_update();
|
|
|
|
|
2019-10-30 01:29:24 +00:00
|
|
|
# FIXME Workaround for RHBZ #1765685 - remove when it's fixed
|
2020-03-27 21:36:30 +00:00
|
|
|
sleep 30;
|
2019-10-30 01:29:24 +00:00
|
|
|
|
2019-09-10 12:59:57 +00:00
|
|
|
# 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"
|
|
|
|
assert_screen ['cockpit_updates_auto_on', 'cockpit_updates_auto_all'];
|
|
|
|
if (match_has_tag 'cockpit_updates_auto_all') {
|
|
|
|
click_lastmatch;
|
|
|
|
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
|
|
|
sleep 3;
|
|
|
|
|
|
|
|
# Check that the dnf-automatic service has started
|
|
|
|
assert_script_run "systemctl is-active dnf-automatic-install.timer";
|
|
|
|
|
|
|
|
# Check that it is scheduled correctly
|
|
|
|
validate_script_output "systemctl show dnf-automatic-install.timer | grep TimersCalendar", sub {$_ =~ "06:00:00" };
|
|
|
|
}
|
|
|
|
|
|
|
|
sub test_flags {
|
|
|
|
return { always_rolllback => 1 };
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
# vim: set sw=4 et:
|