From 7361baef9f13d81537838410e4331336718ffc4e Mon Sep 17 00:00:00 2001 From: Trevor Cooper Date: Fri, 5 May 2023 20:57:13 -0700 Subject: [PATCH] consider Rocky Linux version when adding powertools/crb --- tests/base_update_cli.pm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tests/base_update_cli.pm b/tests/base_update_cli.pm index dd832663..d5204afd 100644 --- a/tests/base_update_cli.pm +++ b/tests/base_update_cli.pm @@ -5,21 +5,34 @@ use packagetest; sub run { my $self = shift; + # switch to TTY3 for both, graphical and console tests $self->root_console(tty => 3); + # enable test repos and install test packages prepare_test_packages; + # check rpm agrees they installed good verify_installed_packages; if (get_var("DISTRI") eq "rocky") { - # pandoc-common is in PowerTools in RockyLinux - assert_script_run 'dnf config-manager --set-enabled powertools', 60; + if (get_version_major() < 9) { + + # pandoc-common is in PowerTools in Rocky Linux 8 + assert_script_run 'dnf config-manager --set-enabled powertools', 60; + } + else { + # pandoc-common is in CRB in Rocky Linux 8 + assert_script_run 'dnf config-manager --set-enabled crb', 60; + } } + # update the fake pandoc-common (should come from the real repo) # this can take a long time if we get unlucky with the metadata refresh assert_script_run 'dnf -y --disablerepo=openqa-testrepo* --disablerepo=updates-testing update pandoc-common', 600; + # check we got the updated version verify_updated_packages; + # now remove pandoc-common, and see if we can do a straight # install from the default repos assert_script_run 'dnf -y remove pandoc-common';