Commit 3d4eede
Prevent SDK from invoking
## Summary
- Clear `PATH` in `cmd/root` auth tests to prevent the Go SDK
(v0.117.0+) from shelling out to `az account show` during credential
resolution
- For `TestBundleConfigureDefault`, restrict `PATH` to system
directories instead of clearing it fully — the bundle loader's script
hook mutator currently requires a shell to be present even when no
scripts are configured (fixing that separately)
- Normalize existing `PATH="/nothing"` in prompt tests to `PATH=""`
The SDK upgrade to v0.117.0 (databricks/databricks-sdk-go#1505, bumped
in #4631) removed per-strategy cloud guards from Azure CLI credentials,
causing `az` to be probed on all platforms regardless of the configured
host. This added ~0.5–2.5s per affected test and wrote `.azure/` cache
files into the source tree.
Verified on macOS and Windows.
## Test plan
- [x] `go test -count=1 ./cmd/root` passes on macOS (1.2s, down from
5.2s)
- [x] `go test -count=1 ./cmd/root` passes on Windows (0.19s)
- [x] No `.azure/` or `Library/` directories created in `cmd/root/`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>az during cmd/root tests (#4710)1 parent cb3c326 commit 3d4eede
2 files changed
+18
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
160 | | - | |
| 161 | + | |
| 162 | + | |
161 | 163 | | |
162 | 164 | | |
163 | 165 | | |
| |||
248 | 250 | | |
249 | 251 | | |
250 | 252 | | |
| 253 | + | |
| 254 | + | |
251 | 255 | | |
252 | 256 | | |
253 | 257 | | |
| |||
276 | 280 | | |
277 | 281 | | |
278 | 282 | | |
| 283 | + | |
| 284 | + | |
279 | 285 | | |
280 | 286 | | |
281 | 287 | | |
| |||
305 | 311 | | |
306 | 312 | | |
307 | 313 | | |
| 314 | + | |
| 315 | + | |
308 | 316 | | |
309 | 317 | | |
310 | 318 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
88 | 96 | | |
89 | 97 | | |
90 | 98 | | |
| |||
0 commit comments