mirror of
https://github.com/khuedoan/homelab.git
synced 2024-12-22 16:04:32 +07:00
24 lines
658 B
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)
|
|
}
|