Skip to content

Commit

Permalink
fix: remove parent temp folder
Browse files Browse the repository at this point in the history
Signed-off-by: chjmil <[email protected]>
  • Loading branch information
saschjmil committed Feb 27, 2025
1 parent e95a630 commit 6c22abb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ func initPlanWithVariables(t *testing.T, variables map[string]interface{}) (*ter

// Copy the terraform folder to a temp folder
tempTestFolder := test_structure.CopyTerraformFolderToTemp(t, "../", "")
defer os.RemoveAll(tempTestFolder)
// Get the path to the parent folder for clean up
tempTestFolderSlice := strings.Split(tempTestFolder, "/")
tempTestFolderPath := strings.Join(tempTestFolderSlice[:len(tempTestFolderSlice)-1], "/")
defer os.RemoveAll(tempTestFolderPath)

// Set up Terraform options
terraformOptions := &terraform.Options{
Expand Down

0 comments on commit 6c22abb

Please sign in to comment.