From aad40f6d0c8900a4cf12c414b2a1fcd722b26293 Mon Sep 17 00:00:00 2001 From: alt-glitch Date: Wed, 8 Apr 2026 18:11:16 -0700 Subject: [PATCH] fix(tests): update mocks for file sync changes - Modal snapshot tests: accept **kw in iter_skills_files/iter_cache_files mock lambdas to match new container_base kwarg - SSH preflight test: mock _detect_remote_home, _ensure_remote_dirs, init_session, and FileSyncManager added in file sync PR --- tests/tools/test_modal_snapshot_isolation.py | 4 ++-- tests/tools/test_ssh_environment.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/tools/test_modal_snapshot_isolation.py b/tests/tools/test_modal_snapshot_isolation.py index b58454cc0..a04bb6507 100644 --- a/tests/tools/test_modal_snapshot_isolation.py +++ b/tests/tools/test_modal_snapshot_isolation.py @@ -124,8 +124,8 @@ def _install_modal_test_modules( sys.modules["tools.interrupt"] = types.SimpleNamespace(is_interrupted=lambda: False) sys.modules["tools.credential_files"] = types.SimpleNamespace( get_credential_file_mounts=lambda: [], - iter_skills_files=lambda: [], - iter_cache_files=lambda: [], + iter_skills_files=lambda **kw: [], + iter_cache_files=lambda **kw: [], ) from_id_calls: list[str] = [] diff --git a/tests/tools/test_ssh_environment.py b/tests/tools/test_ssh_environment.py index f6ee96717..383e48e29 100644 --- a/tests/tools/test_ssh_environment.py +++ b/tests/tools/test_ssh_environment.py @@ -121,6 +121,10 @@ class TestSSHPreflight: called["count"] += 1 monkeypatch.setattr(ssh_env.SSHEnvironment, "_establish_connection", _fake_establish) + monkeypatch.setattr(ssh_env.SSHEnvironment, "_detect_remote_home", lambda self: "/home/alice") + monkeypatch.setattr(ssh_env.SSHEnvironment, "_ensure_remote_dirs", lambda self: None) + monkeypatch.setattr(ssh_env.SSHEnvironment, "init_session", lambda self: None) + monkeypatch.setattr(ssh_env, "FileSyncManager", lambda **kw: type("M", (), {"sync": lambda self, **k: None})()) env = ssh_env.SSHEnvironment(host="example.com", user="alice")