From 2697ad54b71f330e00157bcfae67486dfbb9c7d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 14 Sep 2023 17:25:46 +0200 Subject: [PATCH] drop useless test_update test This test was not finished by me? Now it's going to be broken by lassulus. --- .../tests/test_machines_update_cli.py | 35 ------------------- 1 file changed, 35 deletions(-) delete mode 100644 pkgs/clan-cli/tests/test_machines_update_cli.py diff --git a/pkgs/clan-cli/tests/test_machines_update_cli.py b/pkgs/clan-cli/tests/test_machines_update_cli.py deleted file mode 100644 index 62650f3..0000000 --- a/pkgs/clan-cli/tests/test_machines_update_cli.py +++ /dev/null @@ -1,35 +0,0 @@ -import os -import shutil -from pathlib import Path -from tempfile import TemporaryDirectory - -import pytest -from host_group import HostGroup - - -def test_update( - clan_flake: Path, host_group: HostGroup, monkeypatch: pytest.MonkeyPatch -) -> None: - assert len(host_group.hosts) == 1 - host = host_group.hosts[0] - - with TemporaryDirectory() as tmpdir: - host.meta["flake_uri"] = clan_flake - host.meta["flake_path"] = str(Path(tmpdir) / "rsync-target") - host.ssh_options["SendEnv"] = "REALPATH" - bin = Path(tmpdir).joinpath("bin") - bin.mkdir() - nixos_rebuild = bin.joinpath("nixos-rebuild") - bash = shutil.which("bash") - assert bash is not None - nixos_rebuild.write_text( - f"""#!{bash} -exit 0 -""" - ) - nixos_rebuild.chmod(0o755) - f"{tmpdir}/bin:{os.environ['PATH']}" - nix_state_dir = Path(tmpdir).joinpath("nix") - nix_state_dir.mkdir() - - monkeypatch.setenv("REALPATH", str(nix_state_dir))