Skip to content

Commit

Permalink
add error check for destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
lonegunmanb committed Dec 30, 2022
1 parent e9562dd commit 95c1e9f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion e2etest.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package terraform_module_test_helper

import (
"github.com/stretchr/testify/require"
"testing"
"time"

Expand Down Expand Up @@ -34,7 +35,8 @@ func destroy(t *testing.T, option terraform.Options) {
option.RetryableTerraformErrors = map[string]string{
".*": "Retry destroy on any error",
}
terraform.RunTerraformCommand(t, &option, terraform.FormatArgs(&option, "destroy", "-auto-approve", "-input=false", "-refresh=false")...)
_, err := terraform.RunTerraformCommandE(t, &option, terraform.FormatArgs(&option, "destroy", "-auto-approve", "-input=false", "-refresh=false")...)
require.NoError(t, err)
}

func removeLogger(option terraform.Options) *terraform.Options {
Expand Down

0 comments on commit 95c1e9f

Please sign in to comment.