forked from cwtch.im/cwtch
ConfigureConnections in Tests
This commit is contained in:
parent
e311301d72
commit
a5cea1ca7b
|
@ -114,9 +114,11 @@ func TestFileSharing(t *testing.T) {
|
|||
t.Logf("** Waiting for Alice, Bob...")
|
||||
alice := app2.WaitGetPeer(app, "alice")
|
||||
app.ActivatePeerEngine(alice.GetOnion())
|
||||
app.ConfigureConnections(alice.GetOnion(), true, true, true);
|
||||
bob := app2.WaitGetPeer(app, "bob")
|
||||
app.ActivatePeerEngine(bob.GetOnion())
|
||||
|
||||
app.ConfigureConnections(bob.GetOnion(), true, true, true);
|
||||
|
||||
alice.AutoHandleEvents([]event.Type{event.PeerStateChange, event.NewRetValMessageFromPeer})
|
||||
bob.AutoHandleEvents([]event.Type{event.PeerStateChange, event.NewRetValMessageFromPeer})
|
||||
|
||||
|
|
|
@ -163,6 +163,7 @@ func TestCwtchPeerIntegration(t *testing.T) {
|
|||
alice := app2.WaitGetPeer(app, "Alice")
|
||||
aliceBus := app.GetEventBus(alice.GetOnion())
|
||||
app.ActivatePeerEngine(alice.GetOnion())
|
||||
app.ConfigureConnections(alice.GetOnion(), true, true, true);
|
||||
log.Infoln("Alice created:", alice.GetOnion())
|
||||
// alice.SetScopedZonedAttribute(attr.PublicScope, attr.ProfileZone, constants.Name, "Alice") <- This is now done automatically by ProfileValueExtension, keeping this here for clarity
|
||||
alice.AutoHandleEvents([]event.Type{event.PeerStateChange, event.ServerStateChange, event.NewGroupInvite, event.NewRetValMessageFromPeer})
|
||||
|
@ -170,6 +171,7 @@ func TestCwtchPeerIntegration(t *testing.T) {
|
|||
bob := app2.WaitGetPeer(app, "Bob")
|
||||
bobBus := app.GetEventBus(bob.GetOnion())
|
||||
app.ActivatePeerEngine(bob.GetOnion())
|
||||
app.ConfigureConnections(bob.GetOnion(), true, true, true);
|
||||
log.Infoln("Bob created:", bob.GetOnion())
|
||||
// bob.SetScopedZonedAttribute(attr.PublicScope, attr.ProfileZone, constants.Name, "Bob") <- This is now done automatically by ProfileValueExtension, keeping this here for clarity
|
||||
bob.AutoHandleEvents([]event.Type{event.PeerStateChange, event.ServerStateChange, event.NewGroupInvite, event.NewRetValMessageFromPeer})
|
||||
|
@ -177,6 +179,7 @@ func TestCwtchPeerIntegration(t *testing.T) {
|
|||
carol := app2.WaitGetPeer(app, "Carol")
|
||||
carolBus := app.GetEventBus(carol.GetOnion())
|
||||
app.ActivatePeerEngine(carol.GetOnion())
|
||||
app.ConfigureConnections(carol.GetOnion(), true, true, true);
|
||||
log.Infoln("Carol created:", carol.GetOnion())
|
||||
// carol.SetScopedZonedAttribute(attr.PublicScope, attr.ProfileZone, constants.Name, "Carol") <- This is now done automatically by ProfileValueExtension, keeping this here for clarity
|
||||
carol.AutoHandleEvents([]event.Type{event.PeerStateChange, event.ServerStateChange, event.NewGroupInvite, event.NewRetValMessageFromPeer})
|
||||
|
|
|
@ -116,9 +116,10 @@ func TestFileSharing(t *testing.T) {
|
|||
t.Logf("** Waiting for Alice, Bob...")
|
||||
alice := app2.WaitGetPeer(app, "alice")
|
||||
app.ActivatePeerEngine(alice.GetOnion())
|
||||
app.ConfigureConnections(alice.GetOnion(), true, true, true);
|
||||
bob := app2.WaitGetPeer(app, "bob")
|
||||
app.ActivatePeerEngine(bob.GetOnion())
|
||||
|
||||
app.ConfigureConnections(bob.GetOnion(), true, true, true);
|
||||
alice.AutoHandleEvents([]event.Type{event.PeerStateChange, event.NewRetValMessageFromPeer})
|
||||
bob.AutoHandleEvents([]event.Type{event.PeerStateChange, event.NewRetValMessageFromPeer})
|
||||
|
||||
|
|
Loading…
Reference in New Issue