1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-14 02:34:21 +00:00
os-autoinst-distri-fedora/tests/base_system_logging.pm
Adam Williamson 1a65993d36 Add a perltidy check and apply it to the entire codebase
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-07-28 14:38:38 -07:00

25 lines
787 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: