From 88fc931644010c0104be5ce2a29918000e78ca9c Mon Sep 17 00:00:00 2001 From: Calvin Bascom Date: Sat, 22 May 2021 12:35:24 -0400 Subject: [PATCH] Replace *testing.T with testing.TestingT (#908) The WithDefaultRetryableErrors function now takes a testing.TestingT argument instead of *testing.T to allow for anything that implements the testing.TestingT interface to be used. This allows for GinkgoT() to be used in tests utilizing the ginkgo testing framework. --- modules/terraform/options.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/terraform/options.go b/modules/terraform/options.go index 6182ea002..b0fe85b9b 100644 --- a/modules/terraform/options.go +++ b/modules/terraform/options.go @@ -1,11 +1,11 @@ package terraform import ( - "testing" "time" "github.com/gruntwork-io/terratest/modules/logger" "github.com/gruntwork-io/terratest/modules/ssh" + "github.com/gruntwork-io/terratest/modules/testing" "github.com/jinzhu/copier" "github.com/stretchr/testify/require" ) @@ -86,7 +86,7 @@ func (options *Options) Clone() (*Options, error) { // for retryable errors. The included retryable errors are typical errors that most terraform modules encounter during // testing, and are known to self resolve upon retrying. // This will fail the test if there are any errors in the cloning process. -func WithDefaultRetryableErrors(t *testing.T, originalOptions *Options) *Options { +func WithDefaultRetryableErrors(t testing.TestingT, originalOptions *Options) *Options { newOptions, err := originalOptions.Clone() require.NoError(t, err)