mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-28 08:33:08 +00:00
Remove modularity tests.
Modularity will be retired in Fedora 39 and the modular repository removed. Also, the upcoming version of DNF that is default in Rawhide, does not support modularity, so the tests are currently failing anyway.
This commit is contained in:
parent
d5a9e4777e
commit
0a10727a7a
@ -2289,21 +2289,6 @@
|
|||||||
"TEST_TARGET": "NONE"
|
"TEST_TARGET": "NONE"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"modularity_tests": {
|
|
||||||
"profiles": {
|
|
||||||
"fedora-Server-dvd-iso-aarch64-*-aarch64": 30,
|
|
||||||
"fedora-Server-dvd-iso-ppc64le-*-ppc64le": 30,
|
|
||||||
"fedora-Server-dvd-iso-x86_64-*-64bit": 30
|
|
||||||
},
|
|
||||||
"settings": {
|
|
||||||
"BOOTFROM": "c",
|
|
||||||
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
|
|
||||||
"POSTINSTALL": "modularity_setup modularity_module_list modularity_enable_disable_module modularity_install_module",
|
|
||||||
"ROOT_PASSWORD": "weakpassword",
|
|
||||||
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
|
|
||||||
"USER_LOGIN": "false"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"podman": {
|
"podman": {
|
||||||
"profiles": {
|
"profiles": {
|
||||||
"fedora-CoreOS-colive-iso-x86_64-*-64bit": 20,
|
"fedora-CoreOS-colive-iso-x86_64-*-64bit": 20,
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
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:
|
|
@ -1,74 +0,0 @@
|
|||||||
use base "installedtest";
|
|
||||||
use strict;
|
|
||||||
use modularity;
|
|
||||||
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);
|
|
||||||
|
|
||||||
# Enable the module.
|
|
||||||
my $name = "mysql";
|
|
||||||
my $stream = "8.0";
|
|
||||||
assert_script_run("dnf module enable -y $name:$stream");
|
|
||||||
|
|
||||||
# Check that it is listed in the enabled list.
|
|
||||||
my $enabled = script_output('dnf module list --enabled');
|
|
||||||
my @enabled_modules = parse_module_list($enabled);
|
|
||||||
unless (is_listed($name, $stream, \@enabled_modules)) {
|
|
||||||
die "The enabled module is not listed in the list of enabled modules but it should be.";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check that it is not listed in the disabled list.
|
|
||||||
my $disabled = script_output('dnf module list --disabled');
|
|
||||||
my @disabled_modules = parse_module_list($disabled);
|
|
||||||
if (is_listed($name, $stream, \@disabled_modules)) {
|
|
||||||
die "The enabled module is listed in the list of disabled modules but it should not be.";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Disable some other module.
|
|
||||||
my $name_alt = "nginx";
|
|
||||||
my $stream_alt = "mainline";
|
|
||||||
assert_script_run("dnf module disable -y $name_alt:$stream_alt");
|
|
||||||
|
|
||||||
# Check that it is listed in the disabled list.
|
|
||||||
$disabled = script_output('dnf module list --disabled');
|
|
||||||
@disabled_modules = parse_module_list($disabled);
|
|
||||||
unless (is_listed($name_alt, $stream_alt, \@disabled_modules)) {
|
|
||||||
die "The disabled module is not listed in the list of disabled modules but it should be.";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check that it is not listed in the enabled list.
|
|
||||||
$enabled = script_output('dnf module list --enabled');
|
|
||||||
@enabled_modules = parse_module_list($enabled);
|
|
||||||
if (is_listed($name_alt, $stream_alt, \@enabled_modules)) {
|
|
||||||
die "The disabled module is listed in the list of enabled modules but it should not be.";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Reset the first module to its original state and do the list checks.
|
|
||||||
assert_script_run("dnf module reset -y $name");
|
|
||||||
|
|
||||||
# Check that the module has disappeared from both the lists.
|
|
||||||
$disabled = script_output('dnf module list --disabled');
|
|
||||||
@disabled_modules = parse_module_list($disabled);
|
|
||||||
if (is_listed($name, $stream, \@disabled_modules)) {
|
|
||||||
die "The disabled module is listed in the list of disabled modules but it should not be.";
|
|
||||||
}
|
|
||||||
|
|
||||||
$enabled = script_output('dnf module list --enabled');
|
|
||||||
@enabled_modules = parse_module_list($enabled);
|
|
||||||
if (is_listed($name, $stream, \@enabled_modules)) {
|
|
||||||
die "The disabled module is listed in the list of enabled modules but it should not be.";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Reset the second module but do not perform any list checks.
|
|
||||||
assert_script_run("dnf module reset -y $name_alt");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
1;
|
|
||||||
|
|
||||||
# vim: set sw=4 et:
|
|
@ -1,48 +0,0 @@
|
|||||||
use base "installedtest";
|
|
||||||
use strict;
|
|
||||||
use modularity;
|
|
||||||
use testapi;
|
|
||||||
use utils;
|
|
||||||
|
|
||||||
sub run {
|
|
||||||
my $self = shift;
|
|
||||||
# switch to tty and login as root
|
|
||||||
$self->root_console(tty => 3);
|
|
||||||
|
|
||||||
# Install a Ruby module.
|
|
||||||
my $name = "mysql";
|
|
||||||
my $stream = "8.0";
|
|
||||||
my $profile = "server";
|
|
||||||
assert_script_run("dnf module install -y $name:$stream/$profile");
|
|
||||||
|
|
||||||
# Check that it is listed in the installed list.
|
|
||||||
my $enabled = script_output('dnf module list --installed');
|
|
||||||
my @enabled_modules = parse_module_list($enabled);
|
|
||||||
my $found = is_listed($name, $stream, \@enabled_modules);
|
|
||||||
unless ($found) {
|
|
||||||
die "The installed module is not listed in the list of installed modules but it should be.";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check that it is listed in the enabled list.
|
|
||||||
my $disabled = script_output('dnf module list --enabled');
|
|
||||||
my @disabled_modules = parse_module_list($disabled);
|
|
||||||
$found = is_listed($name, $stream, \@disabled_modules);
|
|
||||||
unless ($found) {
|
|
||||||
die "The installed module is not listed in the list of enabled modules but it should be.";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Remove the module again.
|
|
||||||
assert_script_run("dnf module remove -y $name:$stream");
|
|
||||||
|
|
||||||
# Check that it is not listed in the installed list.
|
|
||||||
my $enabled = script_output('dnf module list --installed');
|
|
||||||
my @enabled_modules = parse_module_list($enabled);
|
|
||||||
my $found = is_listed($name, $stream, \@enabled_modules);
|
|
||||||
if ($found) {
|
|
||||||
die "The installed module is listed in the list of installed modules but it should not be.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
1;
|
|
||||||
|
|
||||||
# vim: set sw=4 et:
|
|
@ -1,58 +0,0 @@
|
|||||||
use base "installedtest";
|
|
||||||
use strict;
|
|
||||||
use modularity;
|
|
||||||
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.
|
|
||||||
|
|
||||||
# Check that modular repositories are installed and enabled.
|
|
||||||
# If the repository does not exist, the output of the command is empty.
|
|
||||||
if (lc(get_var('VERSION')) eq "rawhide") {
|
|
||||||
my $mrawhide_output = script_output("dnf repolist --enabled rawhide-modular");
|
|
||||||
die "The rawhide-modular repo seems not to be installed." unless (length $mrawhide_output);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
my $mfedora_output = script_output("dnf repolist --enabled fedora-modular");
|
|
||||||
die "The fedora-modular repo seems not to be installed." unless (length $mfedora_output);
|
|
||||||
my $mupdates_output = script_output("dnf repolist --enabled updates-modular");
|
|
||||||
die "The updates-modular repo seems not to be installed." unless (length $mupdates_output);
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check that modularity works and dnf can list the modules.
|
|
||||||
my $modules = script_output('dnf module list --disablerepo=updates-modular --disablerepo=updates-testing-modular', timeout => 270);
|
|
||||||
my @modules = parse_module_list($modules);
|
|
||||||
die "The module list seems to be empty when it should not be." if (scalar @modules == 0);
|
|
||||||
|
|
||||||
# Check that modularity works and dnf can list the modules
|
|
||||||
# with the -all option.
|
|
||||||
$modules = script_output('dnf module list --all --disablerepo=updates-modular --disablerepo=updates-testing-modular', timeout => 270);
|
|
||||||
@modules = parse_module_list($modules);
|
|
||||||
die "The module list seems to be empty when it should not be." if (scalar @modules == 0);
|
|
||||||
|
|
||||||
# Check that dnf lists the enabled modules.
|
|
||||||
$modules = script_output('dnf module list --enabled', timeout => 270);
|
|
||||||
@modules = parse_module_list($modules);
|
|
||||||
die "There seem to be enabled modules when the list should be empty." unless (scalar @modules == 0);
|
|
||||||
|
|
||||||
# Check that dnf lists the disabled modules.
|
|
||||||
$modules = script_output('dnf module list --disabled', timeout => 270);
|
|
||||||
@modules = parse_module_list($modules);
|
|
||||||
die "There seem to be disabled modules when the list should be empty." unless (scalar @modules == 0);
|
|
||||||
|
|
||||||
# Check that dnf lists the installed modules.
|
|
||||||
$modules = script_output('dnf module list --installed', timeout => 270);
|
|
||||||
@modules = parse_module_list($modules);
|
|
||||||
die "There seem to be installed modules when the list should be empty." unless (scalar @modules == 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
1;
|
|
||||||
|
|
||||||
# vim: set sw=4 et:
|
|
@ -1,21 +0,0 @@
|
|||||||
use base "installedtest";
|
|
||||||
use strict;
|
|
||||||
use modularity;
|
|
||||||
use testapi;
|
|
||||||
use utils;
|
|
||||||
|
|
||||||
sub run {
|
|
||||||
my $self = shift;
|
|
||||||
# switch to tty and login as root
|
|
||||||
$self->root_console(tty => 3);
|
|
||||||
# modular repos are not installed by default since F39
|
|
||||||
assert_script_run "dnf -y install fedora-repos-modular";
|
|
||||||
}
|
|
||||||
|
|
||||||
sub test_flags {
|
|
||||||
return {fatal => 1, milestone => 1};
|
|
||||||
}
|
|
||||||
|
|
||||||
1;
|
|
||||||
|
|
||||||
# vim: set sw=4 et:
|
|
@ -1,32 +0,0 @@
|
|||||||
use base "installedtest";
|
|
||||||
use strict;
|
|
||||||
use testapi;
|
|
||||||
use utils;
|
|
||||||
use modularity;
|
|
||||||
|
|
||||||
sub run {
|
|
||||||
my $self = shift;
|
|
||||||
# switch to tty and login as root
|
|
||||||
$self->root_console(tty => 3);
|
|
||||||
|
|
||||||
# Update the system
|
|
||||||
assert_script_run('dnf update -y');
|
|
||||||
|
|
||||||
# Enable and install the nodejs module, stream 11.
|
|
||||||
assert_script_run('dnf module install -y nodejs:15');
|
|
||||||
|
|
||||||
# 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.
|
|
||||||
my $installed = script_output('dnf module list --installed');
|
|
||||||
my @installed_modules = parse_module_list($installed);
|
|
||||||
my $found = is_listed("nodejs", "15", \@installed_modules);
|
|
||||||
unless ($found) {
|
|
||||||
die "The expected module and version has not been found. The version might have been incorrectly changed by the upgrade command.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
1;
|
|
||||||
|
|
||||||
# vim: set sw=4 et:
|
|
Loading…
Reference in New Issue
Block a user