Skip to content
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

[Refactor] Check if we can break down the tests by API endpoint #597

Open
phyro opened this issue Mar 22, 2021 · 0 comments
Open

[Refactor] Check if we can break down the tests by API endpoint #597

phyro opened this issue Mar 22, 2021 · 0 comments

Comments

@phyro
Copy link
Member

phyro commented Mar 22, 2021

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

First off, this might be more of a task. From what I can tell, we have a test that goes through the whole wallet life cycle https://github.com/mimblewimble/grin-wallet/blob/master/tests/owner_v3_lifecycle.rs#L47 which is good, but it would be much easier to see which parts we have covered with tests if we broke this down a bit.

Describe the solution you'd like

Before starting the refactor, we'd probably need to figure out why these tests were done linearly. It might be that the setup for the tests is too computationally heavy.
We can start by dividing this into two parts:

  1. API v2 tests
  2. API v3 tests

Then we can divide each of these into foreign and owner parts.

This alone would make it much more readable and more easy to see which tests are missing and could be added to the suite.

Describe alternatives you've considered
/

Additional context

I could be wrong and there is a very good reason why tests are done in this way. In this case, figuring out if all endpoints are tested and writing down which ones are missing would be also good e.g. making table of endpoints for apiv2 and apiv3 with a check if the endpoint is tested and a cross if it is not.

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

No branches or pull requests

1 participant