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

SDK: Create simple test for /stake/delegators/{delegatorAddr} #1193

Closed
NodeGuy opened this issue Aug 28, 2018 · 3 comments
Closed

SDK: Create simple test for /stake/delegators/{delegatorAddr} #1193

NodeGuy opened this issue Aug 28, 2018 · 3 comments
Labels

Comments

@NodeGuy
Copy link
Contributor

NodeGuy commented Aug 28, 2018

We're working on improving the performance of /stake/delegators/{delegatorAddr} in #1133.

To support this work we need a simple unit test. Currently there is a test called TestBonding which is 84 lines of code and very complex. We need a test that:

  • is simple
  • creates its own node and Gaia Lite server
  • creates a state of one account delegating to another, nothing else
  • creates the state using the Go API, not REST calls
  • creates a deterministic state that's the same in every test, including the keys/addresses of both accounts
  • located in x/stake/client/rest (e.g., rest_test.go, near the code it's testing)
@faboweb
Copy link
Collaborator

faboweb commented Aug 28, 2018

I would advice defering any tests like this, until the SDK team has delivered a framework for testing the enables us to easyly do all those things. We can get on their nerves about this, but I don't think we should be developing this.

@faboweb
Copy link
Collaborator

faboweb commented Aug 28, 2018

Very nicely written issue btw. :) 👍

@NodeGuy
Copy link
Contributor Author

NodeGuy commented Sep 11, 2018

Moved to cosmos/cosmos-sdk#2307.

@NodeGuy NodeGuy closed this as completed Sep 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants