Revert "templates: fix tests"

This reverts commit df598275f9.
This commit is contained in:
Qubasa
2025-06-28 22:41:31 +07:00
parent ab872711c8
commit 9f1482e539
5 changed files with 15 additions and 1 deletions

View File

@@ -35,6 +35,13 @@ def test_create_flake(
cli.run(["machines", "create", "machine1"]) cli.run(["machines", "create", "machine1"])
# create a hardware-configuration.nix that doesn't throw an eval error
for patch_machine in ["jon", "sara"]:
(
flake_dir / "machines" / f"{patch_machine}/hardware-configuration.nix"
).write_text("{}")
with capture_output as output: with capture_output as output:
cli.run(["machines", "list"]) cli.run(["machines", "list"])
assert "machine1" in output.out assert "machine1" in output.out
@@ -72,6 +79,13 @@ def test_create_flake_existing_git(
monkeypatch.chdir(flake_dir) monkeypatch.chdir(flake_dir)
cli.run(["machines", "create", "machine1"]) cli.run(["machines", "create", "machine1"])
# create a hardware-configuration.nix that doesn't throw an eval error
for patch_machine in ["jon", "sara"]:
(
flake_dir / "machines" / f"{patch_machine}/hardware-configuration.nix"
).write_text("{}")
with capture_output as output: with capture_output as output:
cli.run(["machines", "list"]) cli.run(["machines", "list"])
assert "machine1" in output.out assert "machine1" in output.out

View File

@@ -1,7 +1,7 @@
{ {
inputs.clan-core.url = "https://git.clan.lol/clan/clan-core/archive/main.tar.gz"; inputs.clan-core.url = "https://git.clan.lol/clan/clan-core/archive/main.tar.gz";
inputs.nixpkgs.follows = "clan-core/nixpkgs"; inputs.nixpkgs.follows = "clan-core/nixpkgs";
inputs.flake-parts.follows = "clan-core/flake-parts"; inputs.flake-parts.url = "github:hercules-ci/flake-parts";
inputs.flake-parts.inputs.nixpkgs-lib.follows = "clan-core/nixpkgs"; inputs.flake-parts.inputs.nixpkgs-lib.follows = "clan-core/nixpkgs";
outputs = outputs =