test: keep tirith checks hermetic

This commit is contained in:
helix4u 2026-05-22 17:05:23 -06:00 committed by Teknium
parent 52a368fa72
commit 71291d83cd
5 changed files with 25 additions and 5 deletions

View file

@ -358,6 +358,10 @@ def _hermetic_environment(tmp_path, monkeypatch):
monkeypatch.setenv("AWS_EC2_METADATA_DISABLED", "true")
monkeypatch.setenv("AWS_METADATA_SERVICE_TIMEOUT", "1")
monkeypatch.setenv("AWS_METADATA_SERVICE_NUM_ATTEMPTS", "1")
# Tirith auto-installs from GitHub when enabled and missing. Unit tests
# should never perform that implicit network/bootstrap path; Tirith-specific
# tests opt back in by patching the security config directly.
monkeypatch.setenv("TIRITH_ENABLED", "false")
# 5. Reset plugin singleton so tests don't leak plugins from
# ~/.hermes/plugins/ (which, per step 3, is now empty — but the