mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-11-22 13:11:26 +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:
parent
d8e327ab1e
commit
1475813b75
@ -647,7 +647,11 @@ sub check_desktop_clean {
|
|||||||
sub download_modularity_tests {
|
sub download_modularity_tests {
|
||||||
# Download the modularity test script, place in the system and then
|
# Download the modularity test script, place in the system and then
|
||||||
# modify the access rights to make it executable.
|
# 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';
|
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';
|
assert_script_run 'chmod 755 /root/test.py';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4712,7 +4712,7 @@
|
|||||||
{
|
{
|
||||||
name => "modularity_tests",
|
name => "modularity_tests",
|
||||||
settings => [
|
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 => "USER_LOGIN", value => "false" },
|
||||||
{ key => "ROOT_PASSWORD", value => "weakpassword" },
|
{ key => "ROOT_PASSWORD", value => "weakpassword" },
|
||||||
{ key => "START_AFTER_TEST", value => "install_default_upload" },
|
{ key => "START_AFTER_TEST", value => "install_default_upload" },
|
||||||
|
22
tests/modularity_checkdefaults.pm
Normal file
22
tests/modularity_checkdefaults.pm
Normal 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:
|
@ -11,11 +11,15 @@ sub run {
|
|||||||
# Download the testing script
|
# Download the testing script
|
||||||
download_modularity_tests();
|
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');
|
assert_script_run('/root/test.py -m dwm -s 6.1 -a list');
|
||||||
|
|
||||||
# Check that module can be enabled and disabled.
|
# Check that module can be enabled and disabled.
|
||||||
assert_script_run('/root/test.py -m dwm -s 6.1 -a enable,disable -f hard');
|
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;
|
1;
|
||||||
|
@ -14,7 +14,10 @@ sub run {
|
|||||||
assert_script_run('/root/test.py -m nodejs -s 11 -a list');
|
assert_script_run('/root/test.py -m nodejs -s 11 -a list');
|
||||||
|
|
||||||
# Check that module can be enabled and removed.
|
# 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;
|
1;
|
||||||
|
Loading…
Reference in New Issue
Block a user