(t *testing.T)
| 133 | } |
| 134 | |
| 135 | func TestServerRole_MarshalYAML(t *testing.T) { |
| 136 | Convey("marshal unmarshal yaml", t, func() { |
| 137 | var role ServerRole |
| 138 | s, _ := role.MarshalYAML() |
| 139 | So(s, ShouldResemble, "Unknown") |
| 140 | So(unmarshalAndMarshalServerRole("unknown"), ShouldEqual, "Unknown") |
| 141 | So(unmarshalAndMarshalServerRole("leader"), ShouldEqual, "Leader") |
| 142 | So(unmarshalAndMarshalServerRole("follower"), ShouldEqual, "Follower") |
| 143 | So(unmarshalAndMarshalServerRole("miner"), ShouldEqual, "Miner") |
| 144 | So(unmarshalAndMarshalServerRole("client"), ShouldEqual, "Client") |
| 145 | }) |
| 146 | } |
| 147 | |
| 148 | func TestNodeID_ToRawNodeID(t *testing.T) { |
| 149 | Convey("NodeID to RawNodeID", t, func() { |
nothing calls this directly
no test coverage detected