Skip to content

Commit dab5f7c

Browse files
committed
Revert $HOME redirect in fuzz harness
With "lakebox" in manualRoots and the state-write no-op guards in place, no path through TestCountFuzz reaches the developer's home directory: the auto-generated workspace/account commands the fuzz exercises don't call env.UserHomeDir, and lakebox commands aren't fuzzed at all. The redirect was defense-in-depth, but layering test-side protection on top of code that's already correct adds noise. Drop it; reinstate locally if a future regression makes it useful. Co-authored-by: Isaac
1 parent 8d2b6a1 commit dab5f7c

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

cmd/fuzz_panic_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
"github.com/databricks/cli/cmd"
1515
"github.com/databricks/cli/libs/cmdctx"
1616
"github.com/databricks/cli/libs/cmdio"
17-
"github.com/databricks/cli/libs/env"
1817
"github.com/databricks/cli/libs/logdiag"
1918
"github.com/databricks/databricks-sdk-go"
2019
"github.com/databricks/databricks-sdk-go/config"
@@ -90,10 +89,6 @@ func newFuzzHarness(t *testing.T) *fuzzHarness {
9089
baseCtx = cmdctx.SetWorkspaceClient(baseCtx, wc)
9190
baseCtx = cmdctx.SetAccountClient(baseCtx, ac)
9291
baseCtx = cmdio.MockDiscard(baseCtx)
93-
// Redirect $HOME so commands that touch state files (e.g. lakebox state at
94-
// ~/.databricks/lakebox.json) can't leak writes onto the developer's
95-
// machine. Any leaf reading via env.UserHomeDir(ctx) gets t.TempDir().
96-
baseCtx = env.WithUserHomeDir(baseCtx, t.TempDir())
9792

9893
cli := cmd.New(baseCtx)
9994

0 commit comments

Comments
 (0)