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

Rename test packages #965

Closed
7 tasks done
MrAlias opened this issue Jul 24, 2020 · 10 comments · Fixed by #1449
Closed
7 tasks done

Rename test packages #965

MrAlias opened this issue Jul 24, 2020 · 10 comments · Fixed by #1449
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed pkg:testing Related to testing or a testing package
Milestone

Comments

@MrAlias
Copy link
Contributor

MrAlias commented Jul 24, 2020

Testing package names are not consistent:

  • sdk/metric/processor/test
  • sdk/metric/aggregator/test
  • sdk/metric/controller/test
  • exporters/metric/test
  • internal/testing
  • api/testharness
  • api/trace/testtrace

Unify these package names to follow the standard library naming convention of {package name}test. E.g.

  • io/iotest
  • http/httptest

So the above listed would become:

  • sdk/metric/processor/processortest
  • sdk/metric/aggregator/aggregatortest
  • sdk/metric/controller/controllertest
  • exporters/metric/metrictest
  • internal/internaltest*
  • api/apitest
  • api/trace/tracetest

[*] The internal/testing package should likely be investigated to see if it can be renamed or merged into something more reflective of the purpose it serves. The internal/metric package also includes testing mocks that could be related. Otherwise, renaming to internal/internaltest would be preferred if it cannot be restructured.

@MrAlias MrAlias added help wanted Extra attention is needed good first issue Good for newcomers pkg:testing Related to testing or a testing package release:required-for-ga labels Jul 24, 2020
@MrAlias
Copy link
Contributor Author

MrAlias commented Jul 24, 2020

The exporters/metric/test package is handled here: #962

@eundoosong
Copy link
Contributor

eundoosong commented Jul 28, 2020

Hello, I'd love to take this as first contribution.
Can I modify all? It looks like there are many places to be modified.

@MrAlias
Copy link
Contributor Author

MrAlias commented Jul 28, 2020

@eundoosong yeah, you'll need to update all the test packages to complete this issue. How you want to structure that in PRs and commits is up to you. Just ask that it is presented for review in a somewhat clear and digestable form.

Also, you'll want to wait on #977 to land as it cleans up some of the use of the sdk/metric/processor/test.

@MrAlias
Copy link
Contributor Author

MrAlias commented Jul 28, 2020

@eundoosong it might also be a good approach to look into what needs to be done with internal/testing and post here if you have any questions prior to making the change.

@eundoosong
Copy link
Contributor

@MrAlias
Thanks,
I'll group testing package changes into each PR so that the review can be in digestable form.
For internal/testing, I'll look into while I'm working on the other.

@MrAlias
Copy link
Contributor Author

MrAlias commented Aug 5, 2020

@eundoosong are you still able to work on the reset of the renamings?

@eundoosong
Copy link
Contributor

@eundoosong are you still able to work on the reset of the renamings?

Sorry, I have been busy for another task at work.
Yes, I have a plan to work on the rest till this week. :)

@MrAlias MrAlias added this to the RC1 milestone Aug 27, 2020
@eundoosong
Copy link
Contributor

@MrAlias
Hello, I'd like to finish off this issue and I have questions.

The internal/testing package should likely be investigated to see if it can be renamed or merged into something more reflective of the purpose it serves. The internal/metric package also includes testing mocks that could be related. Otherwise, renaming to internal/internaltest would be preferred if it cannot be restructured.

After some investigation in internal/testing code, I'm starting to wonder what the point is why this package needs to be(or can be..) restructured.
This package includes byte alignment check, env storage for test, error for test that are widely used for opentelemetry-go's testing, do you think those can be moved to somewhere? or should be separate into its own package?

@eundoosong
Copy link
Contributor

@MrAlias Ping

@MrAlias
Copy link
Contributor Author

MrAlias commented Jan 11, 2021

@eundoosong sorry about the delay. Sounds like just renaming internal/testing to internal/internaltest would be ideal if it cannot be refactored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed pkg:testing Related to testing or a testing package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants