1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-25 07:13:09 +00:00

Update the modularity tests.

* Add test to check module defaults.
* Add whitelist download.
* Fix install test to include selected profile to be on the safe side.
* Add test into templates.
This commit is contained in:
Lukas Ruzicka 2019-07-10 10:47:10 +02:00
parent d8e327ab1e
commit 1475813b75
5 changed files with 36 additions and 3 deletions

View File

@ -647,7 +647,11 @@ sub check_desktop_clean {
sub download_modularity_tests {
# Download the modularity test script, place in the system and then
# modify the access rights to make it executable.
my $whitelist = @_;
assert_script_run 'curl -o /root/test.py https://pagure.io/fedora-qa/modularity_testing_scripts/raw/master/f/modular_functions.py';
if ($whitelist eq 'whitelist') {
assert_script_run 'curl -o /root/whitelist https://pagure.io/fedora-qa/modularity_testing_scripts/raw/master/f/whitelist';
}
assert_script_run 'chmod 755 /root/test.py';
}

View File

@ -4712,7 +4712,7 @@
{
name => "modularity_tests",
settings => [
{ key => "POSTINSTALL", value => "modularity_module_list modularity_enable_disable_module modularity_install_module" },
{ key => "POSTINSTALL", value => "modularity_module_list modularity_enable_disable_module modularity_install_module modularity_checkdefaults" },
{ key => "USER_LOGIN", value => "false" },
{ key => "ROOT_PASSWORD", value => "weakpassword" },
{ key => "START_AFTER_TEST", value => "install_default_upload" },

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('whitelist');
# Test if modules have default stream and profile defined.
assert_script_run('/root/test.py -a checkdefaults -w whitelist');
# Upload modular logs
upload_logs '/root/modular.log', failok=>1;
}
1;
# vim: set sw=4 et:

View File

@ -11,11 +11,15 @@ sub run {
# Download the testing script
download_modularity_tests();
# Check that modularity works and that a particular module is available in the system.
# Check that modularity works, that a particular module is available in the system,
# and display information about that module.
assert_script_run('/root/test.py -m dwm -s 6.1 -a list');
# Check that module can be enabled and disabled.
assert_script_run('/root/test.py -m dwm -s 6.1 -a enable,disable -f hard');
# Upload the modular log file.
upload_logs '/root/modular.log', failok=>1;
}
1;

View File

@ -14,7 +14,10 @@ sub run {
assert_script_run('/root/test.py -m nodejs -s 11 -a list');
# Check that module can be enabled and removed.
assert_script_run('/root/test.py -m nodejs -s 11 -a install,remove -f hard');
assert_script_run('/root/test.py -m nodejs -s 11 -p default -a install,remove -f hard');
# Upload modular logs
upload_logs '/root/modular.log', failok=>1;
}
1;