From c956e41e50d24a4cbde1ede4256e0272246013dc Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 22 Feb 2024 16:44:21 -0800 Subject: [PATCH] base_update_cli: handle updates-testing not existing on ELN Signed-off-by: Adam Williamson --- tests/base_update_cli.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/base_update_cli.pm b/tests/base_update_cli.pm index 2b433d50..bc6bbfd6 100644 --- a/tests/base_update_cli.pm +++ b/tests/base_update_cli.pm @@ -11,15 +11,20 @@ sub run { prepare_test_packages; # check rpm agrees they installed good verify_installed_packages; + # we should disable the test repos now. also, on regular Fedora, + # disable updates-testing; on ELN it doesn't exist and trying to + # disable it causes an error + my $disable = '--disablerepo=openqa-testrepo*'; + $disable .= ' --disablerepo=updates-testing' unless (get_var("VERSION") eq "ELN"); # update the fake acpica-tools (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 acpica-tools', 600; + assert_script_run "dnf -y $disable update acpica-tools", 600; # check we got the updated version verify_updated_packages; # now remove acpica-tools, and see if we can do a straight # install from the default repos assert_script_run 'dnf -y remove acpica-tools'; - assert_script_run 'dnf -y --disablerepo=openqa-testrepo* --disablerepo=updates-testing install acpica-tools', 120; + assert_script_run "dnf -y $disable install acpica-tools", 120; assert_script_run 'rpm -V acpica-tools'; }