From 9f1482e53901b3885e7835ad9c53bc3e31ece0e7 Mon Sep 17 00:00:00 2001 From: Qubasa Date: Sat, 28 Jun 2025 22:41:31 +0700 Subject: [PATCH] Revert "templates: fix tests" This reverts commit df598275f98d21d8f6d2cb41d804697157346df5. --- pkgs/clan-cli/clan_cli/tests/test_create_flake.py | 14 ++++++++++++++ templates/clan/classic/.clan-flake | 0 templates/clan/default/.clan-flake | 0 templates/clan/default/flake.nix | 2 +- templates/clan/minimal/.clan-flake | 0 5 files changed, 15 insertions(+), 1 deletion(-) delete mode 100644 templates/clan/classic/.clan-flake delete mode 100644 templates/clan/default/.clan-flake delete mode 100644 templates/clan/minimal/.clan-flake diff --git a/pkgs/clan-cli/clan_cli/tests/test_create_flake.py b/pkgs/clan-cli/clan_cli/tests/test_create_flake.py index b9790ab16..434574e3a 100644 --- a/pkgs/clan-cli/clan_cli/tests/test_create_flake.py +++ b/pkgs/clan-cli/clan_cli/tests/test_create_flake.py @@ -35,6 +35,13 @@ def test_create_flake( 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: cli.run(["machines", "list"]) assert "machine1" in output.out @@ -72,6 +79,13 @@ def test_create_flake_existing_git( monkeypatch.chdir(flake_dir) 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: cli.run(["machines", "list"]) assert "machine1" in output.out diff --git a/templates/clan/classic/.clan-flake b/templates/clan/classic/.clan-flake deleted file mode 100644 index e69de29bb..000000000 diff --git a/templates/clan/default/.clan-flake b/templates/clan/default/.clan-flake deleted file mode 100644 index e69de29bb..000000000 diff --git a/templates/clan/default/flake.nix b/templates/clan/default/flake.nix index c7150275b..8e61a8b02 100644 --- a/templates/clan/default/flake.nix +++ b/templates/clan/default/flake.nix @@ -1,7 +1,7 @@ { inputs.clan-core.url = "https://git.clan.lol/clan/clan-core/archive/main.tar.gz"; 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"; outputs = diff --git a/templates/clan/minimal/.clan-flake b/templates/clan/minimal/.clan-flake deleted file mode 100644 index e69de29bb..000000000