1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2025-02-21 06:44:32 +00:00

update tests: do main update with --best and fail if it fails

We currently use script_run (not assert_script_run) for the
catch-all update we run at the start of the test, and don't use
--best. This means that if a dependency issue happens at this
point, we don't catch it yet, we only catch it in _advisory_post.

By using assert_script_run and --best, we can fail on dep issues
at this point. We have to keep the _advisory_post check to catch
dep issues that crop up *later* in the test, including when
things like Cockpit or GNOME Software install updates and we
can't force them to use --best logic. But we can at least catch
*most* of them earlier this way.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2025-02-11 12:37:54 -08:00
parent d63c327b16
commit 97b28bcdab

View File

@ -734,7 +734,7 @@ sub _repo_setup_updates {
# where the updated packages should have been installed
# already and we want to fail if they weren't, or CANNED
# tests, there's no point updating the toolbox
script_run "dnf -y update", 1200 unless (get_var("UPGRADE") || get_var("INSTALL") || get_var("CANNED"));
assert_script_run "dnf -y --best update", 1200 unless (get_var("UPGRADE") || get_var("INSTALL") || get_var("CANNED"));
# on liveinst tests, we'll remove the packages we installed
# above (and their deps, which dnf will include automatically),
# just in case they're in the update under test; otherwise we