1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-22 14:03:09 +00:00

Change tests a bit to support git clone of test data.

This commit is contained in:
Lukas Ruzicka 2019-07-23 16:48:36 +02:00
parent 0f2e75f150
commit bb445bb728
7 changed files with 52 additions and 23 deletions

View File

@ -654,7 +654,7 @@ sub download_modularity_tests {
# 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'
assert_script_run 'chmod 755 /root/modularity/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';
}

View File

@ -7,14 +7,15 @@ sub run {
# switch to tty and login as root
$self->root_console(tty=>3);
# Download the testing script
download_modularity_tests();
# Test if modules have default stream and profile defined.
assert_script_run('/root/modular_functions.py -a checkdefaults -w whitelist');
assert_script_run('/root/modularity/modular_functions.py -a checkdefaults -w whitelist');
# Upload modular logs
upload_logs '/root/modular.log', failok=>1;
upload_logs '/root/modularity/modular.log', failok=>1;
}
sub test_flags {
return {always_rollback => 1};
}
1;

View File

@ -8,18 +8,19 @@ sub run {
# switch to tty and login as root
$self->root_console(tty=>3);
# Download the testing script
download_modularity_tests();
# Check that modularity works, that a particular module is available in the system,
# and display information about that module.
assert_script_run('/root/modular_functions.py -m dwm -s 6.1 -a list');
assert_script_run('/root/modularity/modular_functions.py -m dwm -s 6.1 -a list');
# Check that module can be enabled and disabled.
assert_script_run('/root/modular_functions.py -m dwm -s 6.1 -a enable,disable -f hard');
assert_script_run('/root/modularity/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;
upload_logs '/root/modularity/modular.log', failok=>1;
}
sub test_flags {
return {always_rollback => 1};
}
1;

View File

@ -7,17 +7,18 @@ sub run {
# 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/modular_functions.py -s 11 -a list');
assert_script_run('/root/modularity/modular_functions.py -s 11 -a list');
# Check that module can be enabled and removed.
assert_script_run('/root/modular_functions.py -m nodejs -s 11 -p default -a install,remove,reset -f hard');
assert_script_run('/root/modularity/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;
upload_logs '/root/modularity/modular.log', failok=>1;
}
sub test_flags {
return {always_rollback => 1};
}
1;

View File

@ -30,6 +30,10 @@ sub run {
assert_script_run('dnf module list --installed');
}
sub test_flags {
return {always_rollback => 1};
}
1;

View File

@ -0,0 +1,21 @@
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 necessary testing data
download_modularity_tests();
}
sub test_flags {
return {fatal => 1, milestone => 1};
}
1;
# vim: set sw=4 et:

View File

@ -7,20 +7,21 @@ sub run {
# 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/modular_functions.py -m nodejs -s 11 -a enable,install -f hard');
assert_script_run('/root/modularity/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/modular_functions.py -m nodejs -s 11 -a checkinstall -f hard');
assert_script_run('/root/modularity/modular_functions.py -m nodejs -s 11 -a checkinstall -f hard');
}
sub test_flags {
return {always_rollback => 1};
}
1;