From 6dc67d732a92536dd42947af60cf4bfb25411489 Mon Sep 17 00:00:00 2001 From: Chad Smith Date: Fri, 11 Feb 2022 07:34:43 -0700 Subject: test_apt_security: azure platform has specific security URL overrides (#1263) Delivered in /etc/cloud/cloud.cfg.d/90-azure.cfg --- tests/integration_tests/modules/test_apt.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/integration_tests/modules/test_apt.py b/tests/integration_tests/modules/test_apt.py index 48f398d1..adab46a8 100644 --- a/tests/integration_tests/modules/test_apt.py +++ b/tests/integration_tests/modules/test_apt.py @@ -267,10 +267,14 @@ class TestDefaults: sources_list = class_client.read_from_file("/etc/apt/sources.list") # 3 lines from main, universe, and multiverse - assert 3 == sources_list.count("deb http://security.ubuntu.com/ubuntu") - assert 3 == sources_list.count( - "# deb-src http://security.ubuntu.com/ubuntu" - ) + sec_url = "deb http://security.ubuntu.com/ubuntu" + if class_client.settings.PLATFORM == "azure": + sec_url = ( + "deb http://azure.archive.ubuntu.com/ubuntu/ jammy-security" + ) + sec_src_url = sec_url.replace("deb ", "# deb-src ") + assert 3 == sources_list.count(sec_url) + assert 3 == sources_list.count(sec_src_url) DEFAULT_DATA_WITH_URI = _DEFAULT_DATA.format( -- cgit v1.2.3