]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
tests: Require genkey to be run once upfront 3678/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 10 Apr 2025 14:18:17 +0000 (16:18 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 10 Apr 2025 15:22:07 +0000 (17:22 +0200)
.github/workflows/ci.yml
tests/__init__.py
tests/test_boot.py

index e82473b0fccc130b8b16ac36b5ec8dd8ef6d4124..cbdec17017d347b7d6e98f957a543fdfc1884c93 100644 (file)
@@ -203,6 +203,9 @@ jobs:
               chmod +x "mkosi.${script}"
           done
 
+      - name: Generate key
+        run: sudo mkosi genkey
+
       - name: Summary
         run: sudo mkosi summary
 
index 7cdbce243d03eb4d56dbaf52a1be1f6a4a25c0aa..acc653f76be3812002984206a705b32e09b3c563 100644 (file)
@@ -157,9 +157,6 @@ class Image:
 
         return result
 
-    def genkey(self) -> CompletedProcess:
-        return self.mkosi("genkey", ["--force"])
-
 
 @pytest.fixture(scope="session", autouse=True)
 def suspend_capture_stdin(pytestconfig: Any) -> Iterator[None]:
index 3608b1b0c6d2fc76a50c0e63c7798c6d6d552ddc..f55f79f3ce03bd00a795e48f1a1b7aec0c9c14ac 100644 (file)
@@ -32,7 +32,6 @@ def test_format(config: ImageConfig, format: OutputFormat) -> None:
         ):
             pytest.skip("Cannot build RHEL-UBI images with format 'esp' or 'uki'")
 
-        image.genkey()
         image.build(options=["--format", str(format)])
 
         if format in (OutputFormat.disk, OutputFormat.directory) and os.getuid() == 0:
@@ -80,6 +79,5 @@ def test_bootloader(config: ImageConfig, bootloader: Bootloader) -> None:
     firmware = Firmware.linux if bootloader == Bootloader.none else Firmware.auto
 
     with Image(config) as image:
-        image.genkey()
         image.build(["--format=disk", "--bootloader", str(bootloader)])
         image.vm(["--firmware", str(firmware)])