From: Michael Ferrari Date: Wed, 20 Dec 2023 01:35:36 +0000 (+0100) Subject: Add a test for the output X-Git-Tag: v20~50^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2186%2Fhead;p=thirdparty%2Fmkosi.git Add a test for the output --- 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()