MCPcopy Create free account
hub / github.com/CovenantSQL/CovenantSQL / TestServerRole_MarshalYAML

Function TestServerRole_MarshalYAML

proto/nodeinfo_test.go:135–146  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

133}
134
135func 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
148func TestNodeID_ToRawNodeID(t *testing.T) {
149 Convey("NodeID to RawNodeID", t, func() {

Callers

nothing calls this directly

Calls 2

MarshalYAMLMethod · 0.95

Tested by

no test coverage detected