MCPcopy Create free account
hub / github.com/CPChain/chain / TestGetRNodes

Function TestGetRNodes

api/cpclient/cpclient_test.go:46–60  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

44)
45
46func TestGetRNodes(t *testing.T) {
47 t.Skip("must start chain to test")
48 client, err := cpclient.Dial("http://localhost:8501")
49 // local
50 if err != nil {
51 log.Fatal(err.Error())
52 }
53 rnodes, err := client.GetRNodes(context.Background())
54 fmt.Println(rnodes, err)
55 fmt.Println("rpt is :", "addr", rnodes[0].Address, "rpt", rnodes[0].Rpt, "status", rnodes[0].Status)
56
57 if rnodes[0].Rpt == 0 {
58 t.Errorf("GetRNodes failed")
59 }
60}
61
62func TestGetCurrentTerm(t *testing.T) {
63 t.Skip("must start chain to test")

Callers

nothing calls this directly

Calls 3

FatalMethod · 0.65
ErrorMethod · 0.65
GetRNodesMethod · 0.65

Tested by

no test coverage detected