ethers-rs icon indicating copy to clipboard operation
ethers-rs copied to clipboard

Clearly separate Unit Tests from Integration Tests

Open gakonst opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

In our tests we frequently call out to 3rd party providers: Infura, Etherscan, Alchemy, various Gas Oracles and so on. These tests are mixed inside the unit test code. Sometimes these tests fail for 3rd party reasons (rate limiting, service down, 2 PRs opened at the same time causing nonce-reuse etc.) and they can cause confusion.

Describe the solution you'd like

It'd be nice if we could:

  1. Refactor all tests that use the local blockchain (Ganache/Geth locally spun up) w/o any 3rd party deps to be unit tests
  2. Refactor all tests that use 3rd party providers to be integration tests (i.e. under a crate's test/ dir)
  3. (Maybe) Create a separate CI pipeline which ONLY runs the integration tests and make the current CI pipeline only run the unit tests

gakonst avatar Oct 22 '21 11:10 gakonst