1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-12-04 19:13:08 +00:00
os-autoinst-distri-fedora/tests/base_system_logging.pm

25 lines
787 B
Perl
Raw Permalink Normal View History

use base "installedtest";
use strict;
use testapi;
sub run {
my $self = shift;
# switch to TTY3 for both, graphical and console tests
$self->root_console(tty => 3);
# Check that journalctl DOESN'T output "No entries". This is also the case when journal files are missing.
# NOTE: We are quietly assuming that something was logged in journal in last 30 minutes. Should be boot log,
# switch to TTY3 etc.
assert_script_run '! journalctl -aeb --since "30 minutes ago" | grep "\-\- No entries \-\-" -q';
# if rsyslog package is installed (e. g. Server edition), /var/log/secure should exist and be nonempty
assert_script_run '(! rpm --quiet -q rsyslog) || [ -s /var/log/secure ]';
}
sub test_flags {
return {fatal => 1};
}
1;
# vim: set sw=4 et: