test_modules: initialize minimal facter.json

This commit is contained in:
Jörg Thalheim
2024-09-29 19:24:09 +02:00
parent 5f0b0205b2
commit 07593a38d4

View File

@@ -1,4 +1,5 @@
import json import json
import subprocess
from typing import TYPE_CHECKING from typing import TYPE_CHECKING
import pytest import pytest
@@ -59,6 +60,15 @@ def test_add_module_to_inventory(
) )
create_machine(opts) create_machine(opts)
(test_flake_with_core.path / "machines" / "machine1" / "facter.json").write_text(
json.dumps(
{
"version": 1,
"system": "x86_64-linux",
}
)
)
subprocess.run(["git", "add", "."], cwd=test_flake_with_core.path)
inventory = load_inventory_json(base_path) inventory = load_inventory_json(base_path)