test_create_flake: use template name instead of url

This commit is contained in:
Jörg Thalheim
2024-08-21 13:59:38 +02:00
parent 3cdf9b513d
commit 2fbd0b6796

View File

@@ -17,8 +17,7 @@ def test_create_flake(
) -> None: ) -> None:
flake_dir = temporary_home / "test-flake" flake_dir = temporary_home / "test-flake"
url = f"{clan_core}#default" cli.run(["flakes", "create", str(flake_dir), "--template=default"])
cli.run(["flakes", "create", str(flake_dir), f"--url={url}"])
assert (flake_dir / ".clan-flake").exists() assert (flake_dir / ".clan-flake").exists()
# Replace the inputs.clan.url in the template flake.nix # Replace the inputs.clan.url in the template flake.nix
@@ -63,8 +62,7 @@ def test_ui_template(
capture_output: CaptureOutput, capture_output: CaptureOutput,
) -> None: ) -> None:
flake_dir = temporary_home / "test-flake" flake_dir = temporary_home / "test-flake"
url = f"{clan_core}#minimal" cli.run(["flakes", "create", str(flake_dir), "--template=minimal"])
cli.run(["flakes", "create", str(flake_dir), f"--url={url}"])
# Replace the inputs.clan.url in the template flake.nix # Replace the inputs.clan.url in the template flake.nix
substitute( substitute(