mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-22 14:03:09 +00:00
Change way of data preparation.
This commit is contained in:
parent
b31422d188
commit
0f2e75f150
18
lib/utils.pm
18
lib/utils.pm
@ -648,16 +648,18 @@ 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';
|
||||
# Prepare the VM for modularity tests.
|
||||
# First, install git, if is has not been installed before.
|
||||
assert_script_run 'dnf install git -y';
|
||||
# Clone the main script repo, navigate there and set correct permissions.
|
||||
assert_script_run 'git clone https://pagure.io/fedora-qa/modularity_testing_scripts.git /root/modularity';
|
||||
assert_script_run 'cd /root/modularity';
|
||||
assert_script_run 'chmod 755 /root/modular_functions.py'
|
||||
# Clone the directory with the yaml files
|
||||
assert_script_run 'git clone https://pagure.io/releng/fedora-module-defaults.git /root/modularity/yaml';
|
||||
}
|
||||
|
||||
|
||||
sub quit_firefox {
|
||||
# Quit Firefox, handling the 'close multiple tabs' warning screen if
|
||||
# it shows up
|
||||
|
@ -8,10 +8,10 @@ sub run {
|
||||
$self->root_console(tty=>3);
|
||||
|
||||
# Download the testing script
|
||||
download_modularity_tests('whitelist');
|
||||
download_modularity_tests();
|
||||
|
||||
# Test if modules have default stream and profile defined.
|
||||
assert_script_run('/root/test.py -a checkdefaults -w whitelist');
|
||||
assert_script_run('/root/modular_functions.py -a checkdefaults -w whitelist');
|
||||
|
||||
# Upload modular logs
|
||||
upload_logs '/root/modular.log', failok=>1;
|
||||
|
@ -13,10 +13,10 @@ sub run {
|
||||
|
||||
# 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/modular_functions.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');
|
||||
assert_script_run('/root/modular_functions.py -m dwm -s 6.1 -a enable,disable -f hard');
|
||||
|
||||
# Upload the modular log file.
|
||||
upload_logs '/root/modular.log', failok=>1;
|
||||
|
@ -11,10 +11,10 @@ sub run {
|
||||
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 11 -a list');
|
||||
assert_script_run('/root/modular_functions.py -s 11 -a list');
|
||||
|
||||
# Check that module can be enabled and removed.
|
||||
assert_script_run('/root/test.py -m nodejs -s 11 -p default -a install,remove,reset -f hard');
|
||||
assert_script_run('/root/modular_functions.py -m nodejs -s 11 -p default -a install,remove,reset -f hard');
|
||||
|
||||
# Upload modular logs
|
||||
upload_logs '/root/modular.log', failok=>1;
|
||||
|
@ -14,13 +14,13 @@ sub run {
|
||||
assert_script_run('dnf update -y');
|
||||
|
||||
# Enable and install the nodejs module, stream 8.
|
||||
assert_script_run('/root/test.py -m nodejs -s 11 -a enable,install -f hard');
|
||||
assert_script_run('/root/modular_functions.py -m nodejs -s 11 -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 11 -a checkinstall -f hard');
|
||||
assert_script_run('/root/modular_functions.py -m nodejs -s 11 -a checkinstall -f hard');
|
||||
}
|
||||
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user