forked from clan/clan-core
clan-core: add template to impure tests
This commit is contained in:
parent
83fe58e003
commit
133f2b705f
@ -17,10 +17,12 @@ def test_create_flake(
|
|||||||
capsys: pytest.CaptureFixture,
|
capsys: pytest.CaptureFixture,
|
||||||
temporary_home: Path,
|
temporary_home: Path,
|
||||||
cli: Cli,
|
cli: Cli,
|
||||||
|
clan_core: Path,
|
||||||
) -> None:
|
) -> None:
|
||||||
flake_dir = temporary_home / "test-flake"
|
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()
|
assert (flake_dir / ".clan-flake").exists()
|
||||||
monkeypatch.chdir(flake_dir)
|
monkeypatch.chdir(flake_dir)
|
||||||
cli.run(["machines", "create", "machine1"])
|
cli.run(["machines", "create", "machine1"])
|
||||||
@ -55,10 +57,11 @@ def test_ui_template(
|
|||||||
capsys: pytest.CaptureFixture,
|
capsys: pytest.CaptureFixture,
|
||||||
temporary_home: Path,
|
temporary_home: Path,
|
||||||
cli: Cli,
|
cli: Cli,
|
||||||
|
clan_core: Path,
|
||||||
) -> None:
|
) -> None:
|
||||||
flake_dir = temporary_home / "test-flake"
|
flake_dir = temporary_home / "test-flake"
|
||||||
url = "git+https://git.clan.lol/clan/clan-core#empty"
|
url = f"{clan_core}#empty"
|
||||||
cli.run(["flakes", "create", str(flake_dir), "--url", url])
|
cli.run(["flakes", "create", str(flake_dir), f"--url={url}"])
|
||||||
assert (flake_dir / ".clan-flake").exists()
|
assert (flake_dir / ".clan-flake").exists()
|
||||||
monkeypatch.chdir(flake_dir)
|
monkeypatch.chdir(flake_dir)
|
||||||
cli.run(["machines", "create", "machine1"])
|
cli.run(["machines", "create", "machine1"])
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Clan configuration file
|
# Clan configuration file
|
||||||
# TODO: This file is used as a template for the simple GUI workflow
|
# 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 =
|
outputs =
|
||||||
{ self, clan-core, ... }:
|
{ self, clan-core, ... }:
|
||||||
let
|
let
|
||||||
|
Loading…
Reference in New Issue
Block a user