Skip to content

Commit 3bcf3e7

Browse files
pieternclaude
andauthored
Clear agent environment variables in acceptance tests (#4344)
## Changes Agent detection environment variables (`CLAUDECODE`, `GEMINI_CLI`, `CURSOR_AGENT`) were causing the `User-Agent` header to include agent information in acceptance test output. This made tests fail when run from within Claude Code or other agent environments. Moved the agent environment variable clearing from the bundle-specific test.toml to the root test.toml so it applies to all tests globally. Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 5c0467c commit 3bcf3e7

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

acceptance/bundle/user_agent/test.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,3 @@ IncludeRequestHeaders = ["User-Agent"]
44

55
[Env]
66
DATABRICKS_CACHE_ENABLED = 'false'
7-
# Clear agent env vars to prevent them from affecting test output
8-
CLAUDECODE = ''
9-
GEMINI_CLI = ''
10-
CURSOR_AGENT = ''

acceptance/test.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ Env.PYTHONDONTWRITEBYTECODE = "1"
1717
Env.PYTHONUNBUFFERED = "1"
1818
Env.PYTHONUTF8 = "1"
1919

20+
# Clear agent env vars to prevent them from affecting test output
21+
Env.CLAUDECODE = ""
22+
Env.GEMINI_CLI = ""
23+
Env.CURSOR_AGENT = ""
24+
2025
EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"]
2126
EnvMatrixExclude.noplantf = ["DATABRICKS_BUNDLE_ENGINE=terraform", "READPLAN=1"]
2227
EnvRepl.DATABRICKS_BUNDLE_ENGINE = false

0 commit comments

Comments
 (0)