(t *testing.T)
| 33 | } |
| 34 | |
| 35 | func TestStartRpcServerSpecificPort(t *testing.T) { |
| 36 | n := &Node{} |
| 37 | |
| 38 | // A zero value port allows any port binding. |
| 39 | port := 9100 |
| 40 | err := n.initRpcServer(port) |
| 41 | |
| 42 | if err != nil { |
| 43 | t.Error(err) |
| 44 | } |
| 45 | |
| 46 | if n.listener == nil { |
| 47 | t.Errorf("newRpcServer(%v) did not create a listener", port) |
| 48 | } |
| 49 | |
| 50 | if n.port != port { |
| 51 | t.Errorf("newRpcServer(%v) bound to %v; want %v", port, n.port, port) |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | func TestStartRpcServerNegativePort(t *testing.T) { |
| 56 | n := &Node{} |
nothing calls this directly
no test coverage detected