1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-04 15:24:20 +00:00
os-autoinst-distri-fedora/tests/server_cockpit_autoupdate.pm
Adam Williamson 6fefd092e9 Try and fix Cockpit tests breaking with update ISO change
We drop the line for the update ISO from /etc/fstab before
uploading the image after the cockpit_default test, but we don't
make sure it's set up again before Cockpit tries to use it, in
the subsequent Cockpit tests. I don't know why this didn't fail
on stg before, but it sure as hell is failing in prod...

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-06-20 15:18:01 +02:00

52 lines
1.4 KiB
Perl

use base "installedtest";
use strict;
use testapi;
use utils;
use packagetest;
use cockpit;
sub run {
my $self = shift;
# on update flow, we need to ensure the ISO is mounted. this would
# be harmless but waste time on compose flow
repo_setup if (get_var("ADVISORY_OR_TASK"));
# Start Cockpit
start_cockpit(login => 1);
# Navigate to the Update screen
select_cockpit_update();
# FIXME Workaround for RHBZ #1765685, remove if that is ever fixed
sleep 30;
# Switch on automatic updates
assert_and_click 'cockpit_updates_auto', '', 120;
assert_and_click 'cockpit_updates_dnf_install', '', 120;
# from 234 onwards, we get a config screen here: "no updates",
# "security updates only", "all updates"
assert_and_click 'cockpit_updates_auto_all';
assert_and_click 'cockpit_save_changes';
# Check the default automatic settings Everyday at 6 o'clock.
assert_screen 'autoupdate_planned_day';
assert_screen 'autoupdate_planned_time';
# Quit Cockpit
quit_firefox;
# 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: