clan-core: add template to impure tests

This commit is contained in:
Johannes Kirschbauer 2024-05-31 17:58:42 +02:00 committed by hsjobeki
parent 83fe58e003
commit 133f2b705f
2 changed files with 7 additions and 4 deletions

View File

@ -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"])

View File

@ -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