Skip to content

[Peers] Testing: Unit test PeerHolder #699

@julianknutsen

Description

@julianknutsen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions