Skip to content

Commit

Permalink
acc: Use real terraform when CLOUD_ENV is set
Browse files Browse the repository at this point in the history
  • Loading branch information
denik committed Jan 27, 2025
1 parent be908ee commit 4b8fa2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions acceptance/acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ func testAccept(t *testing.T, InprocessMode bool, singleTest string) int {
repls.SetPath(tempHomeDir, "$TMPHOME")
t.Logf("$TMPHOME=%v", tempHomeDir)

// Prevent CLI from downloading terraform in each test:
t.Setenv("DATABRICKS_TF_EXEC_PATH", tempHomeDir)

// Make use of uv cache; since we set HomeEnvVar to temporary directory, it is not picked up automatically
uvCache := getUVDefaultCacheDir(t)
t.Setenv("UV_CACHE_DIR", uvCache)
Expand All @@ -117,6 +114,9 @@ func testAccept(t *testing.T, InprocessMode bool, singleTest string) int {
homeDir := t.TempDir()
// Do not read user's ~/.databrickscfg
t.Setenv(env.HomeEnvVar(), homeDir)

// Prevent CLI from downloading terraform in each test:
t.Setenv("DATABRICKS_TF_EXEC_PATH", tempHomeDir)
}

workspaceClient, err := databricks.NewWorkspaceClient()
Expand Down

0 comments on commit 4b8fa2d

Please sign in to comment.