1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-25 15:23:08 +00:00

add base system logging test

Differential Revision: https://phab.qa.fedoraproject.org/D1202
This commit is contained in:
Jan Sedlák 2017-06-01 11:06:04 +02:00
parent 4114406668
commit 48b99a2291
2 changed files with 68 additions and 0 deletions

View File

@ -358,6 +358,39 @@
}, },
test_suite => { name => "base_update_cli" }, test_suite => { name => "base_update_cli" },
}, },
{
machine => { name => "64bit" },
prio => 20,
product => {
arch => "x86_64",
distri => "fedora",
flavor => "Workstation-live-iso",
version => "*",
},
test_suite => { name => "base_system_logging" },
},
{
machine => { name => "64bit" },
prio => 20,
product => {
arch => "x86_64",
distri => "fedora",
flavor => "Server-dvd-iso",
version => "*",
},
test_suite => { name => "base_system_logging" },
},
{
machine => { name => "64bit" },
prio => 22,
product => {
arch => "x86_64",
distri => "fedora",
flavor => "KDE-live-iso",
version => "*",
},
test_suite => { name => "base_system_logging" },
},
{ {
machine => { name => "64bit" }, machine => { name => "64bit" },
prio => 30, prio => 30,
@ -2438,6 +2471,17 @@
{ key => "HDD_1", value => "disk_%FLAVOR%_%MACHINE%.qcow2" }, { key => "HDD_1", value => "disk_%FLAVOR%_%MACHINE%.qcow2" },
], ],
}, },
{
name => "base_system_logging",
settings => [
{ key => "POSTINSTALL", value => "base_system_logging" },
{ key => "USER_LOGIN", value => "false" },
{ key => "ROOT_PASSWORD", value => "weakpassword" },
{ key => "START_AFTER_TEST", value => "install_default_upload" },
{ key => "BOOTFROM", value => "c" },
{ key => "HDD_1", value => "disk_%FLAVOR%_%MACHINE%.qcow2" },
],
},
{ {
name => "install_kickstart_firewall_disabled", name => "install_kickstart_firewall_disabled",
settings => [ settings => [

View File

@ -0,0 +1,24 @@
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: