]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
tests: Test "none" output format as well
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 11 Dec 2023 17:51:28 +0000 (18:51 +0100)
committerJörg Behrmann <behrmann@physik.fu-berlin.de>
Tue, 12 Dec 2023 09:30:20 +0000 (10:30 +0100)
Let's build an image with "none" as well. There won't be any output,
but we can at least test that nothing breaks when specifying "none"
as the output format.

Also apply the "integration" marker to the entire file while we're
at it.

tests/test_boot.py

index 378a8fa0ed1dbd09fd3952d83fa20f37facc514b..61f481af476b57fb4fad1b9eaf8acb5a2be68be4 100644 (file)
@@ -10,9 +10,10 @@ from mkosi.qemu import find_virtiofsd
 
 from . import Image
 
+pytestmark = pytest.mark.integration
 
-@pytest.mark.integration
-@pytest.mark.parametrize("format", [f for f in OutputFormat if f != OutputFormat.none])
+
+@pytest.mark.parametrize("format", OutputFormat)
 def test_boot(format: OutputFormat) -> None:
     with Image(
         options=[
@@ -48,7 +49,7 @@ def test_boot(format: OutputFormat) -> None:
         if image.distribution == Distribution.rhel_ubi:
             return
 
-        if format == OutputFormat.tar or format.is_extension_image():
+        if format in (OutputFormat.tar, OutputFormat.none) or format.is_extension_image():
             return
 
         if format == OutputFormat.directory and not find_virtiofsd():