1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-09 17:04:21 +00:00
os-autoinst-distri-fedora/tests/server_cockpit_basic.pm
Adam Williamson 8992d37ce6 Add workaround for log filtering issue in cockpit 251
See https://github.com/cockpit-project/cockpit/issues/16243 .
This is a fairly minor issue upstream knows about but will not
be fixed immediately, so we'll add a workaround for it for now.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2021-08-19 15:46:45 -07:00

54 lines
1.8 KiB
Perl

use base "installedtest";
use strict;
use testapi;
use utils;
use cockpit;
sub run {
my $self=shift;
# run firefox and login to cockpit
start_cockpit(1);
# go to the logs screen
assert_and_click "cockpit_logs";
# the date dropdown changes and messes with the button locations, so wait
wait_still_screen 2;
# set priority to info and above in case there are no errors
assert_and_click "cockpit_logs_priority_text";
send_key "backspace";
send_key "backspace";
send_key "backspace";
send_key "backspace";
type_string "info\n";
wait_still_screen 5;
# now click an entry
unless (check_screen "cockpit_logs_entry") {
# in cockpit 251, just hitting enter doesn't apply the change,
# we have to click a button. FIXME: in future this will be
# fixed and we will be able to remove this workaround:
# https://github.com/cockpit-project/cockpit/issues/16243
assert_and_click "cockpit_logs_apply";
record_soft_failure "needed to click to apply filter change - https://github.com/cockpit-project/cockpit/issues/16243";
wait_still_screen 5;
}
assert_and_click "cockpit_logs_entry";
# check we get to the appropriate detail screen
assert_screen "cockpit_logs_detail";
# go to the services screen
assert_and_click "cockpit_services";
wait_still_screen(timeout=>90, stilltime=>5);
# click on an entry
assert_and_click "cockpit_services_entry";
# check we get to the appropriate detail screen...but this click
# often gets lost for some reason, so retry it once
assert_and_click "cockpit_services_entry" unless (check_screen "cockpit_services_detail", 10);
assert_screen "cockpit_services_detail";
}
sub test_flags {
return { fatal => 1 };
}
1;
# vim: set sw=4 et: