From: Daan De Meyer Date: Thu, 10 Apr 2025 14:18:17 +0000 (+0200) Subject: tests: Require genkey to be run once upfront X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3678%2Fhead;p=thirdparty%2Fmkosi.git tests: Require genkey to be run once upfront --- 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)])