@@ -157,6 +157,9 @@ def run_basic_checks(
157157 elif input_image_azl_release == 3 :
158158 assert "ID=azurelinux" in os_release_text
159159 assert 'VERSION_ID="3.0"' in os_release_text
160+ elif input_image_azl_release == 4 :
161+ assert "ID=azurelinux" in os_release_text
162+ assert "VERSION_ID=4.0" in os_release_text
160163 else :
161164 assert False , "Unexpected image identity in /etc/os-release"
162165
@@ -206,9 +209,9 @@ def test_min_change_efi_azl3_qcow_output(
206209) -> None :
207210 azl_release = 3
208211 if platform .machine () == "x86_64" :
209- config_path = TEST_CONFIGS_DIR .joinpath ("os-vm-config.yaml" )
212+ config_path = TEST_CONFIGS_DIR .joinpath ("os-vm-config-amd64-azl3 .yaml" )
210213 else :
211- config_path = TEST_CONFIGS_DIR .joinpath ("os-vm-config-arm64.yaml" )
214+ config_path = TEST_CONFIGS_DIR .joinpath ("os-vm-config-arm64-azl3 .yaml" )
212215 output_format = "qcow2"
213216
214217 run_min_change_test (
@@ -227,6 +230,40 @@ def test_min_change_efi_azl3_qcow_output(
227230 )
228231
229232
233+ def test_min_change_efi_azl4_qcow_output (
234+ docker_client : DockerClient ,
235+ image_customizer_container_url : str ,
236+ core_efi_azl4 : Path ,
237+ ssh_key : Tuple [str , Path ],
238+ test_temp_dir : Path ,
239+ test_instance_name : str ,
240+ logs_dir : Path ,
241+ libvirt_conn : libvirt .virConnect ,
242+ close_list : List [Closeable ],
243+ ) -> None :
244+ azl_release = 4
245+ if platform .machine () == "x86_64" :
246+ config_path = TEST_CONFIGS_DIR .joinpath ("os-vm-config-amd64-azl4.yaml" )
247+ else :
248+ config_path = TEST_CONFIGS_DIR .joinpath ("os-vm-config-arm64-azl4.yaml" )
249+ output_format = "qcow2"
250+
251+ run_min_change_test (
252+ docker_client ,
253+ image_customizer_container_url ,
254+ core_efi_azl4 ,
255+ azl_release ,
256+ config_path ,
257+ output_format ,
258+ ssh_key ,
259+ test_temp_dir ,
260+ test_instance_name ,
261+ logs_dir ,
262+ libvirt_conn ,
263+ close_list ,
264+ )
265+
266+
230267@pytest .mark .skipif (platform .machine () != "x86_64" , reason = "arm64 is not supported for this combination" )
231268def test_min_change_legacy_azl2_qcow_output (
232269 docker_client : DockerClient ,
@@ -272,7 +309,7 @@ def test_min_change_legacy_azl3_qcow_output(
272309 close_list : List [Closeable ],
273310) -> None :
274311 azl_release = 3
275- config_path = TEST_CONFIGS_DIR .joinpath ("os-vm-config.yaml" )
312+ config_path = TEST_CONFIGS_DIR .joinpath ("os-vm-config-amd64-azl3 .yaml" )
276313 output_format = "qcow2"
277314
278315 run_min_change_test (
@@ -291,6 +328,38 @@ def test_min_change_legacy_azl3_qcow_output(
291328 )
292329
293330
331+ @pytest .mark .skipif (platform .machine () != "x86_64" , reason = "no arm64 legacy boot input images are available" )
332+ def test_min_change_legacy_azl4_qcow_output (
333+ docker_client : DockerClient ,
334+ image_customizer_container_url : str ,
335+ core_legacy_azl4 : Path ,
336+ ssh_key : Tuple [str , Path ],
337+ test_temp_dir : Path ,
338+ test_instance_name : str ,
339+ logs_dir : Path ,
340+ libvirt_conn : libvirt .virConnect ,
341+ close_list : List [Closeable ],
342+ ) -> None :
343+ azl_release = 4
344+ config_path = TEST_CONFIGS_DIR .joinpath ("os-vm-config-amd64-azl4.yaml" )
345+ output_format = "qcow2"
346+
347+ run_min_change_test (
348+ docker_client ,
349+ image_customizer_container_url ,
350+ core_legacy_azl4 ,
351+ azl_release ,
352+ config_path ,
353+ output_format ,
354+ ssh_key ,
355+ test_temp_dir ,
356+ test_instance_name ,
357+ logs_dir ,
358+ libvirt_conn ,
359+ close_list ,
360+ )
361+
362+
294363@pytest .mark .skipif (platform .machine () != "x86_64" , reason = "arm64 is not supported for this combination" )
295364def test_min_change_efi_azl2_iso_output (
296365 docker_client : DockerClient ,
@@ -335,7 +404,7 @@ def test_min_change_efi_azl3_iso_bootstrap_output(
335404 close_list : List [Closeable ],
336405) -> None :
337406 azl_release = 3
338- config_path = TEST_CONFIGS_DIR .joinpath ("iso-bootstrap-vm.yaml" )
407+ config_path = TEST_CONFIGS_DIR .joinpath ("iso-bootstrap-vm-azl3 .yaml" )
339408 output_format = "iso"
340409
341410 run_min_change_test (
@@ -354,6 +423,38 @@ def test_min_change_efi_azl3_iso_bootstrap_output(
354423 )
355424
356425
426+ @pytest .mark .skip (reason = "Azure Linux 4.0 ISO bootstrap output is not yet supported" )
427+ def test_min_change_efi_azl4_iso_bootstrap_output (
428+ docker_client : DockerClient ,
429+ image_customizer_container_url : str ,
430+ core_efi_azl4 : Path ,
431+ ssh_key : Tuple [str , Path ],
432+ test_temp_dir : Path ,
433+ test_instance_name : str ,
434+ logs_dir : Path ,
435+ libvirt_conn : libvirt .virConnect ,
436+ close_list : List [Closeable ],
437+ ) -> None :
438+ azl_release = 4
439+ config_path = TEST_CONFIGS_DIR .joinpath ("iso-bootstrap-vm-azl4.yaml" )
440+ output_format = "iso"
441+
442+ run_min_change_test (
443+ docker_client ,
444+ image_customizer_container_url ,
445+ core_efi_azl4 ,
446+ azl_release ,
447+ config_path ,
448+ output_format ,
449+ ssh_key ,
450+ test_temp_dir ,
451+ test_instance_name ,
452+ logs_dir ,
453+ libvirt_conn ,
454+ close_list ,
455+ )
456+
457+
357458def test_min_change_efi_azl3_iso_full_os_output (
358459 docker_client : DockerClient ,
359460 image_customizer_container_url : str ,
@@ -366,7 +467,7 @@ def test_min_change_efi_azl3_iso_full_os_output(
366467 close_list : List [Closeable ],
367468) -> None :
368469 azl_release = 3
369- config_path = TEST_CONFIGS_DIR .joinpath ("iso-full-os-vm.yaml" )
470+ config_path = TEST_CONFIGS_DIR .joinpath ("iso-full-os-vm-azl3 .yaml" )
370471 output_format = "iso"
371472
372473 run_min_change_test (
@@ -385,6 +486,38 @@ def test_min_change_efi_azl3_iso_full_os_output(
385486 )
386487
387488
489+ @pytest .mark .skip (reason = "Azure Linux 4.0 ISO full OS output is not yet supported" )
490+ def test_min_change_efi_azl4_iso_full_os_output (
491+ docker_client : DockerClient ,
492+ image_customizer_container_url : str ,
493+ core_efi_azl4 : Path ,
494+ ssh_key : Tuple [str , Path ],
495+ test_temp_dir : Path ,
496+ test_instance_name : str ,
497+ logs_dir : Path ,
498+ libvirt_conn : libvirt .virConnect ,
499+ close_list : List [Closeable ],
500+ ) -> None :
501+ azl_release = 4
502+ config_path = TEST_CONFIGS_DIR .joinpath ("iso-full-os-vm-azl4.yaml" )
503+ output_format = "iso"
504+
505+ run_min_change_test (
506+ docker_client ,
507+ image_customizer_container_url ,
508+ core_efi_azl4 ,
509+ azl_release ,
510+ config_path ,
511+ output_format ,
512+ ssh_key ,
513+ test_temp_dir ,
514+ test_instance_name ,
515+ logs_dir ,
516+ libvirt_conn ,
517+ close_list ,
518+ )
519+
520+
388521@pytest .mark .skipif (platform .machine () != "x86_64" , reason = "arm64 is not supported for this combination" )
389522def test_min_change_legacy_azl2_iso_output (
390523 docker_client : DockerClient ,
@@ -430,7 +563,7 @@ def test_min_change_legacy_azl3_iso_output(
430563 close_list : List [Closeable ],
431564) -> None :
432565 azl_release = 3
433- config_path = TEST_CONFIGS_DIR .joinpath ("iso-bootstrap-vm.yaml" )
566+ config_path = TEST_CONFIGS_DIR .joinpath ("iso-bootstrap-vm-azl3 .yaml" )
434567 output_format = "iso"
435568
436569 run_min_change_test (
@@ -447,3 +580,36 @@ def test_min_change_legacy_azl3_iso_output(
447580 libvirt_conn ,
448581 close_list ,
449582 )
583+
584+
585+ @pytest .mark .skipif (platform .machine () != "x86_64" , reason = "no arm64 legacy boot input images are available" )
586+ @pytest .mark .skip (reason = "Azure Linux 4.0 ISO bootstrap output is not yet supported" )
587+ def test_min_change_legacy_azl4_iso_output (
588+ docker_client : DockerClient ,
589+ image_customizer_container_url : str ,
590+ core_legacy_azl4 : Path ,
591+ ssh_key : Tuple [str , Path ],
592+ test_temp_dir : Path ,
593+ test_instance_name : str ,
594+ logs_dir : Path ,
595+ libvirt_conn : libvirt .virConnect ,
596+ close_list : List [Closeable ],
597+ ) -> None :
598+ azl_release = 4
599+ config_path = TEST_CONFIGS_DIR .joinpath ("iso-bootstrap-vm-azl4.yaml" )
600+ output_format = "iso"
601+
602+ run_min_change_test (
603+ docker_client ,
604+ image_customizer_container_url ,
605+ core_legacy_azl4 ,
606+ azl_release ,
607+ config_path ,
608+ output_format ,
609+ ssh_key ,
610+ test_temp_dir ,
611+ test_instance_name ,
612+ logs_dir ,
613+ libvirt_conn ,
614+ close_list ,
615+ )
0 commit comments