mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-12-05 02:56:26 +00:00
AlanMarshall
91e1b5df85
This fixes the consistent failure in the modularity_tests of the FLAVOR=dvd-iso test suite thereby resolving Issue #147
49 lines
1.5 KiB
Perl
49 lines
1.5 KiB
Perl
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 = "ruby";
|
|
my $stream = "3.1";
|
|
my $profile = "common";
|
|
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:
|