Skip to content

Commit

Permalink
Add AWS credentials to run tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
skyzyx committed Mar 26, 2024
1 parent 9064cdb commit 7342e70
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/standard/aws_resource_tags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7342e70

Please sign in to comment.