Skip to content
Snippets Groups Projects
Commit 575e71b7 authored by Jake Taylor's avatar Jake Taylor
Browse files

fix tests

parent 93260fb1
No related branches found
No related tags found
1 merge request!170Release
......@@ -40,7 +40,7 @@ func TestClient_GetRoundResults(t *testing.T) {
// Create a new copy of the test client for this test
client, err := newTestingClient(t)
if err != nil {
t.Fatalf("Failed in setup: %v", err)
t.Fatalf("Failed in setup: %+v", err)
}
// Construct the round call back function signature
......
......@@ -68,7 +68,10 @@ func newTestingClient(face interface{}) (*Client, error) {
 
p := gateway.DefaultPoolParams()
p.MaxPoolSize = 1
sender, _ := gateway.NewSender(p, c.rng, def, commsManager, c.storage, nil)
sender, err := gateway.NewSender(p, c.rng, def, commsManager, c.storage, nil)
if err != nil {
return nil, err
}
c.network = &testNetworkManagerGeneric{instance: thisInstance, sender: sender}
 
return c, nil
......@@ -85,6 +88,8 @@ func getNDF(face interface{}) *ndf.NetworkDefinition {
 
cert, _ := utils.ReadFile(testkeys.GetNodeCertPath())
nodeID := id.NewIdFromBytes([]byte("gateway"), face)
gwId := nodeID.DeepCopy()
gwId.SetType(id.Gateway)
return &ndf.NetworkDefinition{
Registration: ndf.Registration{
TlsCertificate: string(cert),
......@@ -100,7 +105,7 @@ func getNDF(face interface{}) *ndf.NetworkDefinition {
},
Gateways: []ndf.Gateway{
{
ID: nodeID.Bytes(),
ID: gwId.Bytes(),
Address: "",
TlsCertificate: string(cert),
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment