From 7585361522a691545746a838ec04d5bc88e4043e Mon Sep 17 00:00:00 2001 From: Chad Smith Date: Wed, 21 Feb 2024 22:08:07 -0700 Subject: [PATCH] tests: on noble, expect default /etc/apt/sources.list livecd-rootfs changes now place a default /etc/apt/sources.list file in Ubuntu Noble and later where deb822 feature flag is enabled in cloud-init. Assert that the /etc/apt/sources.list content matches expectations. --- tests/integration_tests/modules/test_apt_functionality.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/integration_tests/modules/test_apt_functionality.py b/tests/integration_tests/modules/test_apt_functionality.py index 1882e270ba0..bc7bd5e320c 100644 --- a/tests/integration_tests/modules/test_apt_functionality.py +++ b/tests/integration_tests/modules/test_apt_functionality.py @@ -347,9 +347,11 @@ def test_disabled_apt_sources(self, class_client: IntegrationInstance): get_feature_flag_value(class_client, "APT_DEB822_SOURCE_LIST_FILE") ) if feature_deb822: - assert class_client.execute( - f"test -f {ORIG_SOURCES_FILE}" - ).failed, f"Found unexpected {ORIG_SOURCES_FILE}" + + assert ( + cc_apt_configure.UBUNTU_DEFAULT_APT_SOURCES_LIST.strip() + == class_client.read_from_file(ORIG_SOURCES_FILE) + ) DEFAULT_DATA_WITH_URI = _DEFAULT_DATA.format(