Skip to content

[Peers] Testing: Unit test PeerHolder #699

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

Open
Tracked by #707
julianknutsen opened this issue Sep 16, 2020 · 0 comments
Open
Tracked by #707

[Peers] Testing: Unit test PeerHolder #699

julianknutsen opened this issue Sep 16, 2020 · 0 comments

Comments

@julianknutsen
Copy link

As a developer, I want to reduce the number of dependencies for tests that surround the PeerHolder behavior to gain confidence in the object and reduce development time for future features that interact with it.

Definition of Done:

  • Unit tests exist for PeerHolder API
  • Optional: PeerHolder is moved to its own file

Tech Discussion:

Refactoring unified a lot of the individual map accesses to a true API in front of the PeerHolder. Aside from code deduplication, one of the benefits was that it can now be tested in isolation.

The tests should be really straight forward using a fake Peer. The only other external dependency is the ChannelHandler callback for disconnect_peer and a spy already exists for this.

@julianknutsen julianknutsen mentioned this issue Sep 16, 2020
18 tasks
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