Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tests/unit/test_diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,14 @@ def test_extra_merged_into_config(self):
assert diag["config"]["where"] == "streaming_loop"

def test_env_allowlist_only(self, monkeypatch):
monkeypatch.setenv("CUDALINK_LIB_PATH", "C:/venv/site-packages")
# CUDALINK_LIB_PATH is retired (cuda_link resolution no longer uses an env var --
# see cuda_link_bootstrap.py's layered lookup); CUDALINK_DOORBELL is still a live,
# installer-persisted var, so it exercises the same CUDALINK_ prefix allowlist path.
monkeypatch.setenv("CUDALINK_DOORBELL", "1")
monkeypatch.setenv("HF_HOME", "C:/hf")
monkeypatch.setenv("SECRET_TOKEN", "should-not-appear")
diag = diagnostics.collect_diagnostics()
assert diag["env"].get("CUDALINK_LIB_PATH") == "C:/venv/site-packages"
assert diag["env"].get("CUDALINK_DOORBELL") == "1"
assert diag["env"].get("HF_HOME") == "C:/hf"
assert "SECRET_TOKEN" not in diag["env"]

Expand Down