forked from cwtch.im/cwtch
remove integ test from unit tests run; peers don't need to AddContact themselves; remove commented out and non-functional peer accept code
This commit is contained in:
parent
3b65cffbdb
commit
d68ba9abfc
|
@ -94,13 +94,11 @@ func TestCwtchPeerIntegration(t *testing.T) {
|
|||
|
||||
fmt.Println("Creating Alice...")
|
||||
alice := peer.NewCwtchPeer("Alice")
|
||||
alice.Profile.AddContact(alice.Profile.Onion, &alice.Profile.PublicProfile)
|
||||
go alice.Listen()
|
||||
fmt.Println("Alice created:", alice.Profile.Onion)
|
||||
|
||||
fmt.Println("Creating Bob...")
|
||||
bob := peer.NewCwtchPeer("Bob")
|
||||
bob.Profile.AddContact(bob.Profile.Onion, &bob.Profile.PublicProfile)
|
||||
go bob.Listen()
|
||||
fmt.Println("Bob created:", bob.Profile.Onion)
|
||||
|
||||
|
@ -122,14 +120,6 @@ func TestCwtchPeerIntegration(t *testing.T) {
|
|||
|
||||
time.Sleep(time.Second * 15)
|
||||
|
||||
// TODO: bob auto accepted!?
|
||||
/*fmt.Println("Bob checking for new peers and accepting...")
|
||||
bpeers := bob.GetPeers()
|
||||
for bpeer, bpeerState := range bpeers {
|
||||
fmt.Printf(" %v: %v\n", bpeer, bpeerState)
|
||||
}
|
||||
time.Sleep(time.Second * 5)*/
|
||||
|
||||
fmt.Println("Alice inviting Bob to group...")
|
||||
err = alice.InviteOnionToGroup(bob.Profile.Onion, groupId)
|
||||
if err != nil {
|
||||
|
|
|
@ -15,7 +15,6 @@ go test ${1} -coverprofile=server.fetch.cover.out -v ./server/fetch
|
|||
go test ${1} -coverprofile=server.listen.cover.out -v ./server/listen
|
||||
go test ${1} -coverprofile=server.send.cover.out -v ./server/send
|
||||
go test ${1} -coverprofile=server.cover.out -v ./server
|
||||
go test ${1} -coverprofile=testing.cover.out -v ./testing
|
||||
echo "mode: set" > coverage.out && cat *.cover.out | grep -v mode: | sort -r | \
|
||||
awk '{if($1 != last) {print $0;last=$1}}' >> coverage.out
|
||||
rm -rf *.cover.out
|
||||
|
|
Loading…
Reference in New Issue