(t *testing.T)
| 14 | } |
| 15 | |
| 16 | func TestNewRpcServerAnyPort(t *testing.T) { |
| 17 | n := &Node{} |
| 18 | |
| 19 | // A zero value port allows any port binding. |
| 20 | err := n.initRpcServer(0) |
| 21 | |
| 22 | if err != nil { |
| 23 | t.Error(err) |
| 24 | } |
| 25 | |
| 26 | if n.listener == nil { |
| 27 | t.Error("newRpcServer(0) did not create a listener") |
| 28 | } |
| 29 | |
| 30 | if n.port <= 0 { |
| 31 | t.Error("newRpcServer(0) did not bind to an available port") |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | func TestStartRpcServerSpecificPort(t *testing.T) { |
| 36 | n := &Node{} |
nothing calls this directly
no test coverage detected