Skip to content

Refactor: Move tests to src/tests#155

Merged
joshuajbouw merged 5 commits into
developfrom
unify-tests
Jun 19, 2021
Merged

Refactor: Move tests to src/tests#155
joshuajbouw merged 5 commits into
developfrom
unify-tests

Conversation

@birchmd
Copy link
Copy Markdown
Member

@birchmd birchmd commented Jun 18, 2021

Per matklad's blog post, it is better in our situation to have all our tests be part of the same compilation artifact (as opposed to rust's "integration tests" which are all compiled separately).

In this PR we resolve the conflicting versions of wasmtime which was preventing us from having all our tests in one place. It also moves most of the tests from tests to src/tests as suggested in the blog post. An additional benefit of moving the tests under the main source directory is being able to easily reuse code in tests (for example I could delete the AuroraConfig struct from the state migration test because it duplicated some things from test_utils).

The only tests that remain in tests are the ones for the connector. These in particular have a lot of code duplication from production which will be able to be eliminated once it is brought under src/tests. However, we are not doing that in this PR because it needs #154 to be merged first. So it will be done as a follow up PR.

One other thing I noticed is that the new meta-call feature meant we were not running the tests for meta parsing any more. This is also corrected in this PR.

Copy link
Copy Markdown
Contributor

@sept-en sept-en left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! This should really speed up the CI process.

Added some small question there, check it, please.

Comment thread tests/test_upgrade.rs
Copy link
Copy Markdown
Contributor

@mfornet mfornet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love those PR when the amount of LOC removed are 8x the amount of LOC added!

Copy link
Copy Markdown
Contributor

@joshuajbouw joshuajbouw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides nit, looks good!

Comment thread src/test_utils/mod.rs
@joshuajbouw joshuajbouw merged commit 5a775f8 into develop Jun 19, 2021
@joshuajbouw joshuajbouw deleted the unify-tests branch June 19, 2021 05:09
artob added a commit that referenced this pull request Jun 23, 2021
* Remove engine feature flag. (#154)
* Move tests to `src/tests`. (#155)
* Improve the `EvmErc20.sol` contract. (#156)
* Properly document endianess. (#157)
* Fix NEP-141 compliance. (#158)

Co-authored-by: Ahmed Ali <ahmed@aurora.dev>
Co-authored-by: Frank Braun <frank@aurora.dev>
Co-authored-by: Kirill <kirill@aurora.dev>
Co-authored-by: Marcelo Fornet <marcelo@aurora.dev>
Co-authored-by: Michael Birch <michael@aurora.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants