-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
EVM Engineering: explore using CommonTest for everything #12802
Comments
Importing |
We should not be using |
Argument here is that using a single Basically, smart contract development should be as simple as possible and we should reduce the number of options down to 1 whenever we can. |
Generally agree with the direction that you are going for but if you are a developer that cannot determine if you should use |
I think it's mostly just that we want to keep things simple. |
I agree with Mark that it doesn't make sense to test a library with an entire L1 and L2 deployed. Aggregated over hundreds of tests that will definitely slow down the tests. IMO this is most an issue of naming, ie. I'd propose combining If we organize our tests correctly, then we should be able to have semgrep tests per path, so that all tests in |
This PR #12795 merges CommonTest and BridgeInitializer 🙂 |
@maurelian the key point here is that CommonTest doesn't actually deploy all of the contracts unless you explicitly tell it to - if you don't tell it to do that deployment then it behaves identically to Test. If we merged the two contracts then we basically have a single unified testing base that you can use to explicitly request deployments of other contracts if needed. |
If you don't call So my proposal here would be that we only use |
I see, I actually think that's a reasonable idea then, esp. with renaming |
Some tests currently use
Bridge_Initializer
, some useCommonTest
, and other useTest
. We are already combiningBridge_Initializer
andCommonTest
so it might be worth just usingCommonTest
everywhere.CommonTest
definitely works but may make tests take longer. We should benchmark the difference to see if it's significant. If it's not significant, then moving toCommonTest
everywhere would be nice so that people don't need to think as much when writing tests, especially newer contributors. We could also add a semgrep rule against usingTest
directly so that this gets enforced automatically.The text was updated successfully, but these errors were encountered: