]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Add a test for the output 2186/head
authorMichael Ferrari <nekkodroid404@gmail.com>
Wed, 20 Dec 2023 01:35:36 +0000 (02:35 +0100)
committerMichael Ferrari <nekkodroid404@gmail.com>
Wed, 20 Dec 2023 01:37:56 +0000 (02:37 +0100)
tests/test_config.py

index 0f36f9902d84efa14c985297a94070b5da5981dd..4a4ab925f72cf01afb7f333a984317fbaed2b5d5 100644 (file)
@@ -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()