fix(test): isolate agy lookup in hermetic credential test

Clean Windows runners have no agy binary. Point AGY_EXE_PATH at a
dummy file so the test still checks subprocess env sanitization.
This commit is contained in:
ochenstarik-ui 2026-08-27 12:08:14 +00:00
parent b4ae08ef53
commit 93d8f7a1e5

View file

@ -104,6 +104,11 @@ def test_antigravity_adapter_subprocess_env_isolation(tmp_path, monkeypatch):
return mock_res
adapter = AntigravityAdapter()
fake_agy = tmp_path / "agy.exe"
fake_agy.write_bytes(b"")
import antigravity_provider.agy_subprocess as agy_sub
monkeypatch.setattr(agy_sub, "_agy_exe_cache", None)
monkeypatch.setenv("AGY_EXE_PATH", str(fake_agy))
with patch("subprocess.run", side_effect=mock_subprocess_run):
res = adapter.invoke(profile, {"messages": [{"role": "user", "content": "hi"}]})