khuedoan-homelab/test/external_test.go

24 lines
658 B
Go

package test
import (
"testing"
"github.com/gruntwork-io/terratest/modules/terraform"
test_structure "github.com/gruntwork-io/terratest/modules/test-structure"
)
func TestTerraformExternal(t *testing.T) {
t.Parallel()
// Make a copy of the terraform module to a temporary directory. This allows running multiple tests in parallel
// against the same terraform module.
exampleFolder := test_structure.CopyTerraformFolderToTemp(t, "../external", ".")
terraformOptions := terraform.WithDefaultRetryableErrors(t, &terraform.Options{
TerraformDir: exampleFolder,
})
terraform.Init(t, terraformOptions)
terraform.Validate(t, terraformOptions)
}