Cleanup templates

This commit is contained in:
pinpox
2025-06-26 11:41:08 +02:00
committed by Johannes Kirschbauer
parent c2d8cdf7f1
commit a3a81a959a
22 changed files with 110 additions and 377 deletions

View File

@@ -93,7 +93,7 @@ def test_clan_core_templates(
]
clan_core_template_keys = list(clan_core_templates.keys())
expected_templates = ["default", "flake-parts", "minimal", "minimal-flake-parts"]
expected_templates = ["classic", "default", "minimal"]
assert clan_core_template_keys == expected_templates
vlist_temps = list_templates("clan", clan_dir)
@@ -114,14 +114,13 @@ def test_clan_core_templates(
)
assert (new_clan / "flake.nix").exists()
assert (new_clan / "machines").is_dir()
assert (new_clan / "machines" / "jon").is_dir()
config_nix_p = new_clan / "machines" / "jon" / "configuration.nix"
assert (config_nix_p).is_file()
# config_nix_p = new_clan / "machines" / "jon" / "configuration.nix"
# assert (config_nix_p).is_file()
# Test if we can write to the configuration.nix file
with config_nix_p.open("r+") as f:
data = f.read()
f.write(data)
# with config_nix_p.open("r+") as f:
# data = f.read()
# f.write(data)
# Test Case 1: Minimal input with empty templates