-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Migrate Separate ImportState Tests Into All Applicable Tests #8944
Labels
technical-debt
Addresses areas of the codebase that need refactoring or redesign.
tests
PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Comments
bflad
added
tests
PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
technical-debt
Addresses areas of the codebase that need refactoring or redesign.
labels
Jun 11, 2019
This was referenced Aug 27, 2019
This was referenced Sep 4, 2019
This was referenced Sep 11, 2019
This was referenced Oct 8, 2019
This was referenced Oct 21, 2019
This was referenced Oct 28, 2019
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
ghost
unassigned ryndaniels
Mar 29, 2020
ghost
locked and limited conversation to collaborators
Mar 29, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
technical-debt
Addresses areas of the codebase that need refactoring or redesign.
tests
PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Description
An older common practice with acceptance testing was creating a separate acceptance test, that performed the
ImportState
testing:This testing setup creates duplicate test infrastructure for little benefit (only an additional API call) and can miss other permutations of Terraform configurations that do not successfully import. It is generally preferred to just add the
ImportState
testing to all existing applicable tests (except tests like_disappears
tests, which the infrastructure won't be importable).In the above example, its preferable to just have:
Many of these in the Terraform AWS Provider can be found by enabling the
tfproviderlint
AT002
check, since the acceptance test function naming scheme included_import
or_Import
. Some resources may require updates to fixImportStateVerify
issues. There are also some false positive test names that we can have the linter ignore via://lintignore:AT002
Definition of Done
GNUmakefile
, add-AT002
totfproviderlint
command underlint
target and have TravisCI testing passThe text was updated successfully, but these errors were encountered: