1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-11-24 08:02:32 +02:00

Fixed tests

This commit is contained in:
Milos Gajdos 2020-01-14 18:22:58 +00:00
parent 821fda41ae
commit 0ea56a5ffe
No known key found for this signature in database
GPG Key ID: 8B31058CC55DFD4F

View File

@ -21,7 +21,7 @@ func testSetup() *node {
address: testNodeAddress,
peers: make(map[string]*node),
network: newNetwork(Name(testNodeNetName)),
err: new(nodeError),
status: newStatus(),
}
// add some peers to the node
@ -31,7 +31,7 @@ func testSetup() *node {
address: testNode.address + "-" + id,
peers: make(map[string]*node),
network: testNode.network,
err: new(nodeError),
status: newStatus(),
}
}
@ -43,7 +43,7 @@ func testSetup() *node {
address: testNode.address + "-" + id,
peers: make(map[string]*node),
network: testNode.network,
err: new(nodeError),
status: newStatus(),
}
}
@ -272,7 +272,9 @@ func TestUnpackPeerTopology(t *testing.T) {
Node: &pb.Node{
Id: "newPeer",
Address: "newPeerAddress",
Err: &pb.NodeError{},
Status: &pb.Status{
Error: &pb.Error{},
},
},
Peers: make([]*pb.Peer, 0),
}
@ -288,14 +290,18 @@ func TestUnpackPeerTopology(t *testing.T) {
pbPeer1Node := &pb.Node{
Id: peer1.id,
Address: peer1.address,
Err: &pb.NodeError{},
Status: &pb.Status{
Error: &pb.Error{},
},
}
pbPeer111 := &pb.Peer{
Node: &pb.Node{
Id: "peer111",
Address: "peer111Address",
Err: &pb.NodeError{},
Status: &pb.Status{
Error: &pb.Error{},
},
},
Peers: make([]*pb.Peer, 0),
}
@ -304,7 +310,9 @@ func TestUnpackPeerTopology(t *testing.T) {
Node: &pb.Node{
Id: "peer121",
Address: "peer121Address",
Err: &pb.NodeError{},
Status: &pb.Status{
Error: &pb.Error{},
},
},
Peers: make([]*pb.Peer, 0),
}
@ -331,7 +339,7 @@ func TestPeersToProto(t *testing.T) {
address: testNodeAddress,
peers: make(map[string]*node),
network: newNetwork(Name(testNodeNetName)),
err: &nodeError{},
status: newStatus(),
}
topCount := 0