-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
core/internal/cltest: simplify #11383
Conversation
I see that you haven't updated any README files. Would it make sense to do so? |
I see that you haven't updated any CHANGELOG files. Would it make sense to do so? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved many helpers to this package, and this file in particular, since they were only used from here. However, I think something like a package evmtest
(core/chains/evm/internal/evmtest
) could make sense instead 🤷
@dimriou WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, but only for methods that are used across other test files. The ones that are only used by txmgr_test.go
and "seem" of general purpose but they are not used elsewhere, I think they can stay here as you have them.
SonarQube Quality Gate 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok if we merge this and do the evmtest
package in a different PR. We still have to do some work on the EVM extraction side so I think that has higher priority since it will move around more things. Then we clean up what's left.
This PR simplifies
package cltest
by moving helpers which have localized use from single packages. This has two benefits:cltest
: this package has become a catch-all which imports everything, and requires building the whole module just to use a trivial helper func.cltest
: some files/packages no longer depend oncltest
at all.I picked out low-hanging fruit, but there is probably much more to do here. In general, more specialized test packages for separate domains would untangle things a lot.