From 49c3b78c777fd15ef05cdc28d6e7ac4b19f21bbc Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Fri, 31 May 2024 17:58:42 +0200 Subject: [PATCH] clan-core: add template to impure tests --- pkgs/clan-cli/tests/test_create_flake.py | 9 ++++++--- templates/empty/flake.nix | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/clan-cli/tests/test_create_flake.py b/pkgs/clan-cli/tests/test_create_flake.py index a58d2f595..d0721c6e4 100644 --- a/pkgs/clan-cli/tests/test_create_flake.py +++ b/pkgs/clan-cli/tests/test_create_flake.py @@ -17,10 +17,12 @@ def test_create_flake( capsys: pytest.CaptureFixture, temporary_home: Path, cli: Cli, + clan_core: Path, ) -> None: flake_dir = temporary_home / "test-flake" - cli.run(["flakes", "create", str(flake_dir)]) + url = f"{clan_core}#default" + cli.run(["flakes", "create", str(flake_dir), f"--url={url}"]) assert (flake_dir / ".clan-flake").exists() monkeypatch.chdir(flake_dir) cli.run(["machines", "create", "machine1"]) @@ -55,10 +57,11 @@ def test_ui_template( capsys: pytest.CaptureFixture, temporary_home: Path, cli: Cli, + clan_core: Path, ) -> None: flake_dir = temporary_home / "test-flake" - url = "git+https://git.clan.lol/clan/clan-core#empty" - cli.run(["flakes", "create", str(flake_dir), "--url", url]) + url = f"{clan_core}#empty" + cli.run(["flakes", "create", str(flake_dir), f"--url={url}"]) assert (flake_dir / ".clan-flake").exists() monkeypatch.chdir(flake_dir) cli.run(["machines", "create", "machine1"]) diff --git a/templates/empty/flake.nix b/templates/empty/flake.nix index 689983f23..f6a3b6c9d 100644 --- a/templates/empty/flake.nix +++ b/templates/empty/flake.nix @@ -1,7 +1,7 @@ # Clan configuration file # TODO: This file is used as a template for the simple GUI workflow { - inputs.clan-core.url = "git+file:///home/johannes/git/clan-core"; + inputs.clan-core.url = "git+https://git.clan.lol/clan/clan-core"; outputs = { self, clan-core, ... }: let