Improves test coverage of cwtch_peer.go [#53] #88
No reviewers
Labels
No Label
applications
BLOCKED
bug
design
duplicate
enhancement
fixed?
funding-needed
help wanted
infrastructure
invalid
payments
qubes
question
ready-for-implementation
refactor
spam
tapir-server
testing
tor
wontfix
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cwtch.im/cwtch#88
Loading…
Reference in New Issue
No description provided.
Delete Branch "gpestana/cwtch:peer-test-coverage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
WIP
This aims at improving test coverage of cwtch_peer.go
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/cwtch/108
This looks great. It's marked as WIP did you have any more you wanted to add to it?
Thanks! Yes, I'm planning to improve the test coverage a bit more by testing:
TrustPeer
,BlockPeer
,AcceptInvite
andRejectInvite
JoinServer
,SendMessageToGroup
Listen
,Shutdown
I'm trying now to start/mock peer connections between alice and bob so that those methods can be tests. Do you think I should use the same approach as in
./peerpeerconnection_test.go
or should I try to mock the p2p connections?Awesome! The approach used in
peerpeerconnection_test.go
is probably the way to go. Mocking connections gets a bit tricky right now because of the underlying interfaces (it would requite some refactoring inlibricochet-go
.Are you OK with me merging this test? Or did you want to update it with more tests later?
Sounds good, I'll do it that way.
And yes, please go ahead and merge the PR. I'll create a new one after.
ok cwtch.im/cwtch/peer 0.292s coverage: 57.6% of statements
awesome!