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:
parent
b4ae08ef53
commit
93d8f7a1e5
1 changed files with 5 additions and 0 deletions
|
|
@ -104,6 +104,11 @@ def test_antigravity_adapter_subprocess_env_isolation(tmp_path, monkeypatch):
|
||||||
return mock_res
|
return mock_res
|
||||||
|
|
||||||
adapter = AntigravityAdapter()
|
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):
|
with patch("subprocess.run", side_effect=mock_subprocess_run):
|
||||||
res = adapter.invoke(profile, {"messages": [{"role": "user", "content": "hi"}]})
|
res = adapter.invoke(profile, {"messages": [{"role": "user", "content": "hi"}]})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue