downloadProviders is a test helper that caches Terraform providers and returns the path to a Terraform CLI config file that uses the cached providers. This uses the shared testutil caching infrastructure to avoid re-downloading providers on every test run. It is the responsibility of the caller to s
(t *testing.T, providersTf string)
| 3594 | // TF_CLI_CONFIG_FILE. |
| 3595 | // On Windows, provider caching is not supported and an empty string is returned. |
| 3596 | func downloadProviders(t *testing.T, providersTf string) string { |
| 3597 | t.Helper() |
| 3598 | |
| 3599 | cacheRootDir := filepath.Join(testutil.PersistentCacheDir(t), "terraform_workspace_tags_test") |
| 3600 | templateFiles := map[string]string{"providers.tf": providersTf} |
| 3601 | testName := "TestWorkspaceTagsTerraform" |
| 3602 | |
| 3603 | cliConfigPath := testutil.CacheTFProviders(t, cacheRootDir, testName, templateFiles) |
| 3604 | if cliConfigPath != "" { |
| 3605 | t.Logf("Set TF_CLI_CONFIG_FILE=%s", cliConfigPath) |
| 3606 | } |
| 3607 | return cliConfigPath |
| 3608 | } |
| 3609 | |
| 3610 | // Blocked by autostart requirements |
| 3611 | func TestExecutorAutostartBlocked(t *testing.T) { |
no test coverage detected