go icon indicating copy to clipboard operation
go copied to clipboard

services/horizon: Experiment with stub-based testing instead of mock-based

Open paulbellamy opened this issue 5 years ago • 4 comments

What problem does your feature solve?

Mock-based tests can be quite fragile and difficult to maintain. e.g. making a change, and having to update mocks in lots of unrelated tests. Stubs can help alleviate that.

What would you like to see?

Try a stub-based approach for a couple tests. Identify a few good tests to start with. Ingest processor ones using a historyQ could be a good candidate.

What alternatives are there?

  • Leave it as is
  • Try other approaches
  • try to improve our mocking usage

paulbellamy avatar Mar 31 '21 12:03 paulbellamy