From 5410c4c7af649728c16231f2d0492b0e1e1f3aae Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 10 Apr 2025 16:18:17 +0200 Subject: [PATCH] tests: Require genkey to be run once upfront --- .github/workflows/ci.yml | 3 +++ tests/__init__.py | 3 --- tests/test_boot.py | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e82473b0f..cbdec1701 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -203,6 +203,9 @@ jobs: chmod +x "mkosi.${script}" done + - name: Generate key + run: sudo mkosi genkey + - name: Summary run: sudo mkosi summary diff --git a/tests/__init__.py b/tests/__init__.py index 7cdbce243..acc653f76 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -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]: diff --git a/tests/test_boot.py b/tests/test_boot.py index 3608b1b0c..f55f79f3c 100644 --- a/tests/test_boot.py +++ b/tests/test_boot.py @@ -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)]) -- 2.47.2