Skip to content

Commit

Permalink
Merge pull request #7420 from freedomofpress/stg-noble-phased
Browse files Browse the repository at this point in the history
Handle unapplied phased updates in testinfra checks
  • Loading branch information
cfm authored Jan 28, 2025
2 parents 3e20ade + afcd913 commit e33a910
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions molecule/testinfra/common/test_automatic_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,18 @@ def test_unattended_upgrades_functional(host):
f" origin=Ubuntu,archive={distro}, origin=Ubuntu,archive={distro}-security"
f", origin=Ubuntu,archive={distro}-updates, origin=SecureDrop,codename={distro}"
)
expected_result = (
"No packages found that can be upgraded unattended and no pending auto-removals"
)

all_good = "No packages found that can be upgraded unattended and no pending auto-removals"
assert expected_origins in c.stdout
assert expected_result in c.stdout
if distro == "focal":
assert all_good in c.stdout
else: # noqa: PLR5501
if all_good in c.stdout:
assert all_good in c.stdout
else:
# noble+ uses phased updates, so there may be packages that can be
# upgraded that won't be upgraded; look for a different message in that case
assert "left to upgrade set()\nAll upgrades installed" in c.stdout


def test_fixed_phasing(host):
Expand Down

0 comments on commit e33a910

Please sign in to comment.