mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-29 00:53:09 +00:00
b62d832c3a
This branch is very fragile, because the test won't fail if we miss the match on the security needle. So in practice, we are never going to notice when the needle goes stale, and we'll just wind up never triggering this branch and always going down the other path. That's the current situation: the security_install needle last matched more than a year ago at least. Let's just admit the truth here and drop the branch entirely. Also update the cockpit_updates_restart_ignore needle. This is in a similar case - we don't really notice when it goes stale, as the test completes, it just takes a bit longer - but since this one is quite easy to find, let's just update it instead of dropping it. Signed-off-by: Adam Williamson <awilliam@redhat.com>
70 lines
1.9 KiB
Perl
70 lines
1.9 KiB
Perl
use base "installedtest";
|
|
use strict;
|
|
use testapi;
|
|
use utils;
|
|
use packagetest;
|
|
use cockpit;
|
|
|
|
sub run {
|
|
my $self = shift;
|
|
|
|
my $cockdate = "0";
|
|
# Remove a package, disable repositories and enable test repositories, install the package
|
|
# from that repository to make the system outdated and verify that that package was
|
|
# correctly installed.
|
|
prepare_test_packages;
|
|
verify_installed_packages;
|
|
|
|
# Start Cockpit
|
|
start_cockpit(login => 1);
|
|
# Navigate to update screen
|
|
select_cockpit_update();
|
|
|
|
|
|
# Install the rest of the updates, or any updates
|
|
# that have not been previously installed.
|
|
assert_and_click 'cockpit_updates_all_install';
|
|
my $run = 0;
|
|
while ($run < 40) {
|
|
# When Cockpit packages are also included in the updates
|
|
# the user is forced to reconnect, i.e. to restart the Web Application
|
|
# and relog for further interaction. We will check if reconnection is
|
|
# needed and if so, we will restart Firefox and login again. We do
|
|
# *not* need to gain admin privs again, trying to do so will fail.
|
|
#
|
|
last if (check_screen("cockpit_updates_updated"));
|
|
if (check_screen("cockpit_updates_reconnect", 1)) {
|
|
quit_firefox;
|
|
start_cockpit(login => 1, admin => 0);
|
|
select_cockpit_update();
|
|
last;
|
|
|
|
}
|
|
# Ignore rebooting the system because we want to finish the test instead.
|
|
elsif (check_screen('cockpit_updates_restart_ignore', 1)) {
|
|
assert_and_click 'cockpit_updates_restart_ignore';
|
|
last;
|
|
}
|
|
else {
|
|
sleep 10;
|
|
$run = $run + 1;
|
|
}
|
|
}
|
|
# Check that the system is updated
|
|
assert_screen 'cockpit_updates_updated';
|
|
|
|
# Switch off Cockpit
|
|
quit_firefox;
|
|
|
|
# Verify that the test package was updated correctly.
|
|
verify_updated_packages;
|
|
}
|
|
|
|
sub test_flags {
|
|
return {always_rollback => 1};
|
|
}
|
|
|
|
1;
|
|
|
|
# vim: set sw=4 et:
|