@@ -42,11 +42,11 @@ func TestPrimary_stateStore_workspaceCmd(t *testing.T) {
4242 // Move the provider binaries into a directory that we will point terraform
4343 // to using the -plugin-dir cli flag.
4444 platform := getproviders .CurrentPlatform .String ()
45- hashiDir := "cache/registry.terraform.io/hashicorp/"
46- if err := os .MkdirAll (tf .Path (hashiDir , "simple6/0.0.1/" , platform ), os .ModePerm ); err != nil {
45+ fsMirrorPath := "cache/registry.terraform.io/hashicorp/simple6/0.0.1 /"
46+ if err := os .MkdirAll (tf .Path (fsMirrorPath , platform ), os .ModePerm ); err != nil {
4747 t .Fatal (err )
4848 }
49- if err := os .Rename (simple6ProviderExe , tf .Path (hashiDir , "simple6/0.0.1/" , platform , "terraform-provider-simple6" )); err != nil {
49+ if err := os .Rename (simple6ProviderExe , tf .Path (fsMirrorPath , platform , "terraform-provider-simple6" )); err != nil {
5050 t .Fatal (err )
5151 }
5252
@@ -149,13 +149,14 @@ func TestPrimary_stateStore_stateCmds(t *testing.T) {
149149 simple6Provider := filepath .Join (tf .WorkDir (), "terraform-provider-simple6" )
150150 simple6ProviderExe := e2e .GoBuild ("github.com/hashicorp/terraform/internal/provider-simple-v6/main" , simple6Provider )
151151
152- // Move the provider binaries into the correct directory .terraform/providers/ directory
152+ // Move the provider binaries into the correct .terraform/providers/ directory
153153 // that will contain provider binaries in an initialized working directory.
154154 platform := getproviders .CurrentPlatform .String ()
155- if err := os .MkdirAll (tf .Path (".terraform/providers/registry.terraform.io/hashicorp/simple6/0.0.1/" , platform ), os .ModePerm ); err != nil {
155+ providerCachePath := ".terraform/providers/registry.terraform.io/hashicorp/simple6/0.0.1/"
156+ if err := os .MkdirAll (tf .Path (providerCachePath , platform ), os .ModePerm ); err != nil {
156157 t .Fatal (err )
157158 }
158- if err := os .Rename (simple6ProviderExe , tf .Path (".terraform/providers/registry.terraform.io/hashicorp/simple6/0.0.1/" , platform , "terraform-provider-simple6" )); err != nil {
159+ if err := os .Rename (simple6ProviderExe , tf .Path (providerCachePath , platform , "terraform-provider-simple6" )); err != nil {
159160 t .Fatal (err )
160161 }
161162
0 commit comments