diff --git a/pkgs/clan-cli/tests/end_to_end/test_basics.py b/pkgs/clan-cli/tests/end_to_end/test_basics.py index f00fe074d..5bb3dce3d 100644 --- a/pkgs/clan-cli/tests/end_to_end/test_basics.py +++ b/pkgs/clan-cli/tests/end_to_end/test_basics.py @@ -6,12 +6,19 @@ import pytest from cli import Cli +@pytest.fixture +def cli() -> Cli: + return Cli() + + @pytest.mark.impure -def test_basics( - monkeypatch: pytest.MonkeyPatch, temporary_dir: Path, capsys: pytest.CaptureFixture +def test_all( + monkeypatch: pytest.MonkeyPatch, + temporary_dir: Path, + capsys: pytest.CaptureFixture, + cli: Cli, ) -> None: monkeypatch.chdir(temporary_dir) - cli = Cli() cli.run(["create"]) assert (temporary_dir / ".clan-flake").exists() cli.run(["machines", "create", "machine1"]) @@ -29,3 +36,8 @@ def test_basics( flake_outputs["nixosConfigurations"]["machine1"] except KeyError: pytest.fail("nixosConfigurations.machine1 not found in flake outputs") + # configure machine1 + capsys.readouterr() + cli.run(["config", "--machine", "machine1", "services.openssh.enable"]) + capsys.readouterr() + cli.run(["config", "--machine", "machine1", "services.openssh.enable", "true"])