@@ -99,8 +99,8 @@ def __lib_test_custom_sources_with(self, include_sources_list=False, include_sou
9999 # Checks swapping and caching: All -> Security -> All -> All
100100 for i in range (3 ):
101101 # All
102- expected_debstyle_entry_count = 2 if include_source_parts_debstyle else 0 # 2 entries in the debstyle mock
103- expected_sources_list_entry_count = (4 if include_sources_list else 0 ) + (5 if include_source_parts_list else 0 ) # 4 in regular file, 3 in mock folder
102+ expected_debstyle_entry_count = 3 if include_source_parts_debstyle else 0 # 3 entries in the debstyle mock(incl. fips-updates)
103+ expected_sources_list_entry_count = (4 if include_sources_list else 0 ) + (6 if include_source_parts_list else 0 ) # 4 in regular file, 6 in mock folder (incl. fips-updates)
104104 sources_dir , sources_list = package_manager ._AptitudePackageManager__get_custom_sources_to_spec (include_max_patch_publish_date )
105105 self .__check_custom_sources (sources_dir , sources_list ,
106106 sources_debstyle_expected = include_source_parts_debstyle ,
@@ -115,8 +115,8 @@ def __lib_test_custom_sources_with(self, include_sources_list=False, include_sou
115115 continue
116116
117117 # Security
118- expected_debstyle_entry_count = 1 if include_source_parts_debstyle else 0 # 1 security entry in the debstyle mock
119- expected_sources_list_entry_count = (1 if include_sources_list else 0 ) + (1 if include_source_parts_list else 0 ) # 1 security entry in regular file, 1 security entry in mock folder
118+ expected_debstyle_entry_count = 2 if include_source_parts_debstyle else 0 # 2 security entries in the debstyle mock (security + fips-updates)
119+ expected_sources_list_entry_count = (1 if include_sources_list else 0 ) + (2 if include_source_parts_list else 0 ) # 1 security entry in regular file, 2 security entries in mock folder (security + fips-updates)
120120 sources_dir , sources_list = package_manager ._AptitudePackageManager__get_custom_sources_to_spec (include_max_patch_publish_date , "Security" )
121121 self .__check_custom_sources (sources_dir , sources_list ,
122122 sources_debstyle_expected = include_source_parts_debstyle ,
@@ -146,8 +146,8 @@ def __check_custom_sources(self, sources_dir, sources_list, sources_debstyle_exp
146146 self .assertEqual (len (data ), sources_debstyle_entry_count )
147147 for entry in data :
148148 if security_only :
149- self .assertTrue ("security" in entry )
150- if max_patch_publish_date != str ():
149+ self .assertTrue ("security" in entry or "fips-updates" in entry )
150+ if max_patch_publish_date != str () and "fips-updates" not in entry : # exception for unsupported repo :
151151 self .assertTrue (max_patch_publish_date in entry )
152152 else :
153153 self .assertFalse (os .path .isdir (sources_dir ))
@@ -159,8 +159,8 @@ def __check_custom_sources(self, sources_dir, sources_list, sources_debstyle_exp
159159 self .assertEqual (len (data ), sources_list_entry_count )
160160 for entry in data :
161161 if security_only :
162- self .assertTrue ("security" in entry )
163- if max_patch_publish_date != str () and "ppa" not in entry : # exception for unsupported repo
162+ self .assertTrue ("security" in entry or "fips-updates" in entry )
163+ if max_patch_publish_date != str () and "ppa" not in entry and "fips-updates" not in entry : # exception for unsupported repo
164164 self .assertTrue (max_patch_publish_date in entry )
165165
166166 # region - Mock sources preparation and clean up
@@ -212,7 +212,8 @@ def __get_sources_data_one_line_style_ext():
212212 "deb http://ppa.launchpad.net/upubuntu-com/web/ubuntu focal main\n " + \
213213 "deb http://azure.archive.ubuntu.com/ubuntu/ focal-security universe\n " + \
214214 "deb http://in.archive.ubuntu.com/ubuntu/ focal multiverse\n " + \
215- "deb http://cn.archive.ubuntu.com/ubuntu/ focal main\n "
215+ "deb http://cn.archive.ubuntu.com/ubuntu/ focal main\n " + \
216+ "deb https://esm.ubuntu.com/fips-updates/ubuntu jammy-updates main\n "
216217
217218 @staticmethod
218219 def __get_sources_data_debstyle ():
@@ -229,7 +230,13 @@ def __get_sources_data_debstyle():
229230 "URIs: http://azure.archive.ubuntu.com/ubuntu/ \n " + \
230231 "Suites: noble-security \n " + \
231232 "Components: main universe restricted multiverse \n " + \
232- "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg \n "
233+ "Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg \n " + \
234+ "\n " + \
235+ "Types: deb \n " + \
236+ "URIs: https://esm.ubuntu.com/fips-updates/ubuntu \n " + \
237+ "Suites: jammy-updates \n " + \
238+ "Components: main \n " + \
239+ "Signed-By: /usr/share/keyrings/ubuntu-pro-fips-updates.gpg \n "
233240 # endregion
234241
235242if __name__ == '__main__' :
0 commit comments