Create openqa tests to test modularity.

This commit is contained in:
Lukas Ruzicka 2018-09-26 15:32:42 +02:00 committed by Adam Williamson
parent f2aa7e4652
commit 24e68aa8a2
6 changed files with 174 additions and 0 deletions

View File

@ -642,3 +642,10 @@ sub check_desktop_clean {
}
die "Clean desktop not reached!";
}
sub download_modularity_tests {
# Download the modularity test script, place in the system and then
# modify the access rights to make it executable.
assert_script_run 'curl -o /root/test.py https://pagure.io/fedora-qa/modularity_testing_scripts/raw/master/f/modular_functions.py';
assert_script_run 'chmod 755 /root/test.py';
}

View File

@ -1579,6 +1579,17 @@
},
test_suite => { name => "install_kickstart_nfs" },
},
{
machine => { name => "64bit" },
prio => 30,
product => {
arch => "x86_64",
distri => "fedora",
flavor => "universal",
version => "*",
},
test_suite => { name => "modularity_tests" },
},
{
machine => { name => "64bit" },
prio => 20,
@ -2238,6 +2249,18 @@
test_suite => { name => "install_kickstart_user_creation" },
},
{
group_name => "Fedora PowerPC",
machine => { name => "ppc64le" },
prio => 30,
product => {
arch => "ppc64le",
distri => "fedora",
flavor => "universal",
version => "*",
},
test_suite => { name => "modularity_tests" },
},
{
group_name => "Fedora PowerPC",
machine => { name => "ppc64le" },
prio => 20,
@ -3222,6 +3245,18 @@
test_suite => { name => "install_kickstart_hdd" },
},
{
group_name => "Fedora PowerPC",
machine => { name => "ppc64" },
prio => 30,
product => {
arch => "ppc64",
distri => "fedora",
flavor => "universal",
version => "*",
},
test_suite => { name => "modularity_tests" },
},
{
group_name => "Fedora PowerPC",
machine => { name => "ppc64" },
prio => 30,
@ -3762,6 +3797,18 @@
test_suite => { name => "install_kickstart_user_creation" },
},
{
group_name => "Fedora AArch64",
machine => { name => "aarch64" },
prio => 30,
product => {
arch => "aarch64",
distri => "fedora",
flavor => "universal",
version => "*",
},
test_suite => { name => "modularity_tests" },
},
{
group_name => "Fedora AArch64",
machine => { name => "aarch64" },
prio => 20,
@ -5208,6 +5255,17 @@
{ key => "HDD_1", value => "disk_%FLAVOR%_%MACHINE%.qcow2" },
],
},
{
name => "modularity_tests",
settings => [
{ key => "POSTINSTALL", value => "modularity_module_list modularity_enable_disable_module modularity_install_module modularity_update_norepo" },
{ 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 => "base_services_start",
settings => [

View File

@ -0,0 +1,23 @@
use base "installedtest";
use strict;
use testapi;
use utils;
sub run {
my $self=shift;
my $hook_run = 0;
# switch to tty and login as root
$self->root_console(tty=>3);
# Download the testing script
download_modularity_tests();
# Check that modularity works and that a particular module is available in the system.
assert_script_run('/root/test.py -m dwm -s 6.0 -a list');
# Check that module can be enabled and disabled.
assert_script_run('/root/test.py -m dwm -s 6.0 -a enable,disable -f hard');
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,22 @@
use base "installedtest";
use strict;
use testapi;
use utils;
sub run {
my $self=shift;
# switch to tty and login as root
$self->root_console(tty=>3);
# Download the testing script
download_modularity_tests();
# Check that modularity works and that a particular module is available in the system.
assert_script_run('/root/test.py -m nodejs -s 8 -a list');
# Check that module can be enabled and removed.
assert_script_run('/root/test.py -m nodejs -s 8 -a install,remove -f hard');
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,36 @@
use base "installedtest";
use strict;
use testapi;
use utils;
sub run {
my $self=shift;
# switch to tty and login as root
$self->root_console(tty=>3);
# The test case will check that dnf has modular functions and that
# it is possible to invoke modular commands to work with modularity.
# It does not check the content of the further listed lists for any
# particular packages, modules or streams.
# Check that modularity works and dnf can list the modules.
assert_script_run('dnf module list');
# Check that modularity works and dnf can list the modules
# with the -all option.
assert_script_run('dnf module list --all');
# Check that dnf lists the enabled modules.
assert_script_run('dnf module list --enabled');
# Check that dnf lists the disabled modules.
assert_script_run('dnf module list --disabled');
# Check that dnf lists the installed modules.
assert_script_run('dnf module list --installed');
}
1;
# vim: set sw=4 et:

View File

@ -0,0 +1,28 @@
use base "installedtest";
use strict;
use testapi;
use utils;
sub run {
my $self=shift;
# switch to tty and login as root
$self->root_console(tty=>3);
# Download the testing script
download_modularity_tests();
# Update the system
assert_script_run('dnf update -y');
# Enable and install the nodejs module, stream 8.
assert_script_run('/root/test.py -m nodejs -s 8 -a enable,install -f hard');
# Update the system without modular repos.
assert_script_run('dnf update --disablerepo=\*modular -y');
# Check that the same version is listed in the installed modules.
assert_script_run('/root/test.py -m nodejs -s 8 -a checkinstall -f hard');
}
1;
# vim: set sw=4 et: