From 7342e70829064168ce80d6c59b36e8fb109f3246 Mon Sep 17 00:00:00 2001 From: Ryan Parman Date: Mon, 25 Mar 2024 21:46:57 -0600 Subject: [PATCH] Add AWS credentials to run tests. --- tests/standard/aws_resource_tags_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/standard/aws_resource_tags_test.go b/tests/standard/aws_resource_tags_test.go index 50f92bc..dc7c327 100644 --- a/tests/standard/aws_resource_tags_test.go +++ b/tests/standard/aws_resource_tags_test.go @@ -42,14 +42,16 @@ func TestAwsResourceTags(t *testing.T) { binary = "terraform" } - if _, err = os.Stat(which.Which(binary)); os.IsNotExist(err) { - t.Fatalf("Binary %s must be installed first", binary) + if os.Getenv("GITHUB_ACTIONS") != "true" { + if _, err = os.Stat(which.Which(binary)); os.IsNotExist(err) { + t.Fatalf("Binary %s must be installed first", binary) + } } // https://pkg.go.dev/github.com/gruntwork-io/terratest/modules/terraform#Options terraformOptions := &terraform.Options{ - // The path to Terraform. - TerraformBinary: which.Which(binary), + // The path to Terraform/OpenTofu. + TerraformBinary: binary, // The path to where our Terraform code is located TerraformDir: tmpDir,