diff --git a/molecule/testinfra/common/test_automatic_updates.py b/molecule/testinfra/common/test_automatic_updates.py index c420797fdf..904e32d03f 100644 --- a/molecule/testinfra/common/test_automatic_updates.py +++ b/molecule/testinfra/common/test_automatic_updates.py @@ -147,9 +147,11 @@ def test_unattended_upgrades_functional(host): """ c = host.run("sudo unattended-upgrades --dry-run --debug") assert c.rc == 0 + distro = host.system_info.codename expected_origins = ( - "Allowed origins are: origin=Ubuntu,archive=focal, origin=Ubuntu,archive=focal-security" - ", origin=Ubuntu,archive=focal-updates, origin=SecureDrop,codename=focal" + f"Allowed origins are:" + 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" diff --git a/molecule/testinfra/common/test_platform.py b/molecule/testinfra/common/test_platform.py index e751a4bf96..ab42853db3 100644 --- a/molecule/testinfra/common/test_platform.py +++ b/molecule/testinfra/common/test_platform.py @@ -15,9 +15,9 @@ def test_ansible_version(host): def test_platform(host): """ - SecureDrop requires Ubuntu 20.04 LTS + SecureDrop requires Ubuntu 20.04 (focal) or 24.04 (noble) """ assert host.system_info.type == "linux" assert host.system_info.distribution == "ubuntu" - assert host.system_info.codename == "focal" - assert host.system_info.release == "20.04" + version = (host.system_info.codename, host.system_info.release) + assert version in {("focal", "20.04"), ("noble", "24.04")}