Modularity tests changes

This fixes the consistent failure in the modularity_tests
of the  FLAVOR=dvd-iso test suite  thereby resolving Issue #147
This commit is contained in:
Alan Marshall 2023-03-02 15:55:03 +00:00
parent 895d6095fc
commit 91e1b5df85
Signed by: alangm
GPG Key ID: 4DF85D1B967F51A6
3 changed files with 36 additions and 30 deletions

View File

@ -11,8 +11,8 @@ sub run {
$self->root_console(tty => 3); $self->root_console(tty => 3);
# Enable the module. # Enable the module.
my $name = "swig"; my $name = "ruby";
my $stream = "4.0"; my $stream = "3.1";
assert_script_run("dnf module enable -y $name:$stream"); assert_script_run("dnf module enable -y $name:$stream");
# Check that it is listed in the enabled list. # Check that it is listed in the enabled list.
@ -30,8 +30,8 @@ sub run {
} }
# Disable some other module. # Disable some other module.
my $name_alt = "postgresql"; my $name_alt = "ruby";
my $stream_alt = "13"; my $stream_alt = "3.1";
assert_script_run("dnf module disable -y $name_alt:$stream_alt"); assert_script_run("dnf module disable -y $name_alt:$stream_alt");
# Check that it is listed in the disabled list. # Check that it is listed in the disabled list.

View File

@ -10,8 +10,8 @@ sub run {
$self->root_console(tty => 3); $self->root_console(tty => 3);
# Install a Ruby module. # Install a Ruby module.
my $name = "nodejs"; my $name = "ruby";
my $stream = "14"; my $stream = "3.1";
my $profile = "common"; my $profile = "common";
assert_script_run("dnf module install -y $name:$stream/$profile"); assert_script_run("dnf module install -y $name:$stream/$profile");

View File

@ -16,14 +16,20 @@ sub run {
# NOTE: In Rocky the baseos and appstream default repos include and add modules in the # NOTE: In Rocky the baseos and appstream default repos include and add modules in the
# default installation where in Fedora all modules are in separate modular repos. # default installation where in Fedora all modules are in separate modular repos.
# Until we figure out how to keep track of the count of expected enabled modular # Until we figure out how to keep track of the count of expected enabled modular
# packages this will need to assume what appears to be the default in minimal. # packages this will need to assume what appears to be the default in dvd-iso.
my $modules = script_output('dnf module list --enabled', timeout => 270); my $modules = script_output('dnf module list --enabled', timeout => 270);
my @modules = parse_module_list($modules); my @modules = parse_module_list($modules);
my $module_count = scalar @modules; my $module_count = scalar @modules;
my $flavor = get_var('FLAVOR', 'minimal-iso'); my $flavor = get_var('FLAVOR', 'minimal-iso');
my $packageset = get_var('PACKAGE_SET', 'minimal'); my $packageset = get_var('PACKAGE_SET', 'graphical-server');
my $version = get_var('VERSION', 'none');
if ($version eq 'none') {
die "VERSION=9.1 or VERSION=8.8 or VERSION=8.7 need to be specified on the command line.";
} elsif ($version eq '9.1') {
die "Enabled modules ($module_count) is not equal to the default (0)." unless (scalar @modules == 0);
} elsif ($version eq '8.8' || $version eq '8.7') {
if ($flavor eq 'boot-iso') { if ($flavor eq 'boot-iso') {
die "There seem to be enabled modules when the list should be empty." unless ($module_count == 0); die "There seem to be enabled modules when the list should be empty." unless ($module_count == 0);
} elsif ($flavor eq 'minimal-iso') { } elsif ($flavor eq 'minimal-iso') {
@ -40,12 +46,13 @@ sub run {
} elsif ($packageset eq 'graphical-server') { } elsif ($packageset eq 'graphical-server') {
die "Enabled modules ($module_count) is not equal to the default (9)." unless (scalar @modules == 9); die "Enabled modules ($module_count) is not equal to the default (9)." unless (scalar @modules == 9);
} elsif ($packageset eq 'workstation') { } elsif ($packageset eq 'workstation') {
die "Enabled modules ($module_count) is not equal to the default (6)." unless (scalar @modules == 6); die "Enabled modules ($module_count) is not equal to the default (13)." unless (scalar @modules == 13);
} elsif ($packageset eq 'virtualization-host') { } elsif ($packageset eq 'virtualization-host') {
die "Enabled modules ($module_count) is not equal to the default (2)." unless (scalar @modules == 2); die "Enabled modules ($module_count) is not equal to the default (2)." unless (scalar @modules == 2);
} }
} else { } else {
die "Enabled modules ($module_count) is not equal to the default (2)." unless (scalar @modules == 2); die "Enabled modules ($module_count) is not equal to the default (0)." unless (scalar @modules == 0);
}
} }
# Check that dnf lists the disabled modules. # Check that dnf lists the disabled modules.
@ -59,7 +66,6 @@ sub run {
die "There seem to be installed modules when the list should be empty." unless (scalar @modules == 0); die "There seem to be installed modules when the list should be empty." unless (scalar @modules == 0);
} }
1; 1;
# vim: set sw=4 et: # vim: set sw=4 et: