1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-04 23:24:21 +00:00
os-autoinst-distri-fedora/tests/base_system_logging.pm
2017-06-01 11:06:04 +02:00

25 lines
785 B
Perl

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: