From 07593a38d45159085d8185478f1afbce1d8ae7b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 29 Sep 2024 19:24:09 +0200 Subject: [PATCH] test_modules: initialize minimal facter.json --- pkgs/clan-cli/tests/test_modules.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/clan-cli/tests/test_modules.py b/pkgs/clan-cli/tests/test_modules.py index 6ff97e4ee..162ef6285 100644 --- a/pkgs/clan-cli/tests/test_modules.py +++ b/pkgs/clan-cli/tests/test_modules.py @@ -1,4 +1,5 @@ import json +import subprocess from typing import TYPE_CHECKING import pytest @@ -59,6 +60,15 @@ def test_add_module_to_inventory( ) 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)