tests/create_clan: bring back read,write checks
This commit is contained in:
@@ -112,15 +112,15 @@ def test_clan_core_templates(
|
|||||||
Path(default_template.src["path"]),
|
Path(default_template.src["path"]),
|
||||||
new_clan,
|
new_clan,
|
||||||
)
|
)
|
||||||
assert (new_clan / "flake.nix").exists()
|
flake_file = new_clan / "flake.nix"
|
||||||
assert (new_clan / "machines").is_dir()
|
|
||||||
# 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
|
assert (flake_file).exists()
|
||||||
# with config_nix_p.open("r+") as f:
|
# Test if we can read + write files after the template was copied
|
||||||
# data = f.read()
|
with flake_file.open("r+") as f:
|
||||||
# f.write(data)
|
data = f.read()
|
||||||
|
f.write(data)
|
||||||
|
|
||||||
|
assert (new_clan / "machines").is_dir()
|
||||||
|
|
||||||
|
|
||||||
# Test Case 1: Minimal input with empty templates
|
# Test Case 1: Minimal input with empty templates
|
||||||
|
|||||||
Reference in New Issue
Block a user