forked from cwtch.im/cwtch
fix tests
This commit is contained in:
parent
912894b55f
commit
ce7d57a1a5
|
@ -3,9 +3,9 @@ package connections
|
|||
import (
|
||||
"cwtch.im/cwtch/model"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/application"
|
||||
"sync"
|
||||
"time"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/application"
|
||||
)
|
||||
|
||||
// Manager encapsulates all the logic necessary to manage outgoing peer and server connections.
|
||||
|
|
|
@ -5,12 +5,12 @@ import (
|
|||
"cwtch.im/cwtch/peer/peer"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/application"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/connection"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/identity"
|
||||
"log"
|
||||
"time"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/application"
|
||||
)
|
||||
|
||||
// PeerPeerConnection encapsulates a single outgoing Peer->Peer connection
|
||||
|
@ -76,6 +76,7 @@ func (ppc *PeerPeerConnection) SendPacket(data []byte) {
|
|||
})
|
||||
}
|
||||
|
||||
// DoOnChannel performs an operation on the requested channel
|
||||
func (ppc *PeerPeerConnection) DoOnChannel(ctype string, direction channels.Direction, doSomethingWith func(channel *channels.Channel)) {
|
||||
ppc.WaitTilAuthenticated()
|
||||
ppc.connection.Do(func() error {
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"cwtch.im/cwtch/peer/peer"
|
||||
"cwtch.im/cwtch/protocol"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/application"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/connection"
|
||||
"git.openprivacy.ca/openprivacy/libricochet-go/identity"
|
||||
|
@ -81,7 +82,7 @@ func TestPeerPeerConnection(t *testing.T) {
|
|||
|
||||
profile := model.GenerateNewProfile("alice")
|
||||
hostname := identity.Hostname()
|
||||
ppc := NewPeerPeerConnection("127.0.0.1:5452|"+hostname, profile, nil)
|
||||
ppc := NewPeerPeerConnection("127.0.0.1:5452|"+hostname, profile, nil, application.ApplicationInstanceFactory{})
|
||||
|
||||
tp := new(TestPeer)
|
||||
tp.Init()
|
||||
|
|
Loading…
Reference in New Issue