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

Consolidate import_*_test.go files into resource_*_test.go files #4705

Closed
bflad opened this issue May 30, 2018 · 2 comments · Fixed by #5891
Closed

Consolidate import_*_test.go files into resource_*_test.go files #4705

bflad opened this issue May 30, 2018 · 2 comments · Fixed by #5891
Labels
provider Pertains to the provider itself, rather than any interaction with AWS. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Milestone

Comments

@bflad
Copy link
Member

bflad commented May 30, 2018

Semi-related to #4676

There are currently over 1000 files in the aws package directory. The import_*_test.go files, which were originally created to hold resource import tests, are inconsistently used between resources with many new resources/tests simply just implementing the additional import TestCase. For now, let's just lift and shift the existing import tests from those import_*_test.go files into their equivalent resource_*_test.go files.

At some point we may want to consider migrating the "import" tests into just a new TestCase in their "regular" test counterparts so we are not continually spinning up twice the infrastructure and time just to test importing a (duplicate) resource.

@bflad 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. provider Pertains to the provider itself, rather than any interaction with AWS. labels May 30, 2018
bflad added a commit that referenced this issue Sep 15, 2018
…o files

Reference: #4705

Previously and currently:

```
$ go test -list . ./aws | wc -l
    2530
```
bflad added a commit that referenced this issue Sep 16, 2018
…o files

Reference: #4705

Previously and currently:

```
$ go test -list . ./aws | wc -l
    2530
```
@ewbankkit
Copy link
Contributor

To reduce the number of source files in the aws directory we could also consolidate the much smaller number of *_migrate.go and *_migrate_test.go files.

@bflad bflad added this to the v1.37.0 milestone Sep 19, 2018
@ghost
Copy link

ghost commented Apr 3, 2020

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!

@hashicorp hashicorp locked and limited conversation to collaborators Apr 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
provider Pertains to the provider itself, rather than any interaction with AWS. technical-debt Addresses areas of the codebase that need refactoring or redesign. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
2 participants