Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace *testing.T with testing.TestingT (#908) #909

Merged
merged 1 commit into from
May 25, 2021

Conversation

cbascom
Copy link

@cbascom cbascom commented May 22, 2021

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.

Test output for all terraform tests is available here: https://gist.github.com/cbascom/81d2c6659beace706072329594e7068c

There is a test failure unrelated to my changes. I have terraform v0.15.4 installed locally. The current terratest is not compatible with that terraform version since the planWithNoChangesRegexp used by the GetResourceCountE function looks for No changes\. Infrastructure is up-to-date\. instead of (\033\[32m)?No changes\.(\033\[0m\033\[1m)? Your infrastructure matches the configuration\. which is output by my terraform version.

I didn't see how you handle compatibility with different terraform versions so I didn't include this update in this PR, but let me know how you want to handle that. I can submit a new issue for that if necessary.

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.
Copy link
Member

@brikis98 brikis98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks! I'll kick off tests now.

@brikis98
Copy link
Member

Tests passed! Merging now.

@brikis98 brikis98 merged commit 1408c8f into gruntwork-io:master May 25, 2021
@brikis98
Copy link
Member

Since #905 fixes a very similar issue, going to wait for that before doing a new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants