mirror of https://github.com/databricks/cli.git
acc: Use real terraform when CLOUD_ENV is set (#2245)
## Changes - If CLOUD_ENV is set to do not override with dummy value. This allows running acceptance tests as integration tests. - Needed for https://github.com/databricks/cli/pull/2242 ## Tests Manually run the test suite against dogfood. `CLOUD_ENV=aws go test ./acceptance`
This commit is contained in:
parent
11436faafe
commit
3ffac80007
|
@ -99,9 +99,6 @@ func testAccept(t *testing.T, InprocessMode bool, singleTest string) int {
|
||||||
repls.SetPath(tempHomeDir, "$TMPHOME")
|
repls.SetPath(tempHomeDir, "$TMPHOME")
|
||||||
t.Logf("$TMPHOME=%v", tempHomeDir)
|
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
|
// Make use of uv cache; since we set HomeEnvVar to temporary directory, it is not picked up automatically
|
||||||
uvCache := getUVDefaultCacheDir(t)
|
uvCache := getUVDefaultCacheDir(t)
|
||||||
t.Setenv("UV_CACHE_DIR", uvCache)
|
t.Setenv("UV_CACHE_DIR", uvCache)
|
||||||
|
@ -119,6 +116,9 @@ func testAccept(t *testing.T, InprocessMode bool, singleTest string) int {
|
||||||
homeDir := t.TempDir()
|
homeDir := t.TempDir()
|
||||||
// Do not read user's ~/.databrickscfg
|
// Do not read user's ~/.databrickscfg
|
||||||
t.Setenv(env.HomeEnvVar(), homeDir)
|
t.Setenv(env.HomeEnvVar(), homeDir)
|
||||||
|
|
||||||
|
// Prevent CLI from downloading terraform in each test:
|
||||||
|
t.Setenv("DATABRICKS_TF_EXEC_PATH", tempHomeDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
workspaceClient, err := databricks.NewWorkspaceClient()
|
workspaceClient, err := databricks.NewWorkspaceClient()
|
||||||
|
|
Loading…
Reference in New Issue