From 6fda52637124105995d69a10a653cd7dfe786a3f Mon Sep 17 00:00:00 2001 From: Michael Ferrari Date: Wed, 20 Dec 2023 02:35:36 +0100 Subject: [PATCH] Add a test for the output --- tests/test_config.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/test_config.py b/tests/test_config.py index 0f36f9902..4a4ab925f 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -783,6 +783,23 @@ def test_specifiers(tmp_path: Path) -> None: assert {k: v for k, v in config.environment.items() if k in expected} == expected +def test_output_id_version(tmp_path: Path) -> None: + d = tmp_path + + (d / "mkosi.conf").write_text( + """ + [Output] + ImageId=output + ImageVersion=1.2.3 + """ + ) + + with chdir(d): + _, [config] = parse_config() + + assert config.output == "output_1.2.3" + + def test_deterministic() -> None: assert MkosiConfig.default() == MkosiConfig.default() -- 2.47.2