mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-11-24 14:11:24 +00:00
33 lines
929 B
Perl
33 lines
929 B
Perl
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:
|