Skip to content

Commit

Permalink
chore: use temp folder for terratest
Browse files Browse the repository at this point in the history
  • Loading branch information
johncblandii committed Jul 28, 2020
1 parent 64ea058 commit fe23055
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/src/examples_complete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ import (
func TestExamplesComplete(t *testing.T) {
t.Parallel()

rootFolder := "../../"
terraformFolderRelativeToRoot := "examples/complete"
tempTestFolder := test_structure.CopyTerraformFolderToTemp(t, rootFolder, terraformFolderRelativeToRoot)

terraformOptions := &terraform.Options{
// The path to where our Terraform code is located
TerraformDir: "../../examples/complete",
TerraformDir: tempTestFolder,
Upgrade: true,
// Variables to pass to our Terraform code using -var-file options
VarFiles: []string{"fixtures.us-west-1.tfvars"},
Expand Down Expand Up @@ -44,9 +48,13 @@ func TestExamplesComplete(t *testing.T) {
func TestExamplesCompleteWithGrants(t *testing.T) {
t.Parallel()

rootFolder := "../../"
terraformFolderRelativeToRoot := "examples/complete"
tempTestFolder := test_structure.CopyTerraformFolderToTemp(t, rootFolder, terraformFolderRelativeToRoot)

terraformOptions := &terraform.Options{
// The path to where our Terraform code is located
TerraformDir: "../../examples/complete",
TerraformDir: tempTestFolder,
Upgrade: true,
// Variables to pass to our Terraform code using -var-file options
VarFiles: []string{"grants.us-west-1.tfvars"},
Expand Down

0 comments on commit fe23055

Please sign in to comment.