MCPcopy Create free account
hub / github.com/tendermint/tendermint / TestRPCConfigValidateBasic

Function TestRPCConfigValidateBasic

config/config_test.go:64–83  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

62}
63
64func TestRPCConfigValidateBasic(t *testing.T) {
65 cfg := TestRPCConfig()
66 assert.NoError(t, cfg.ValidateBasic())
67
68 fieldsToTest := []string{
69 "GRPCMaxOpenConnections",
70 "MaxOpenConnections",
71 "MaxSubscriptionClients",
72 "MaxSubscriptionsPerClient",
73 "TimeoutBroadcastTxCommit",
74 "MaxBodyBytes",
75 "MaxHeaderBytes",
76 }
77
78 for _, fieldName := range fieldsToTest {
79 reflect.ValueOf(cfg).Elem().FieldByName(fieldName).SetInt(-1)
80 assert.Error(t, cfg.ValidateBasic())
81 reflect.ValueOf(cfg).Elem().FieldByName(fieldName).SetInt(0)
82 }
83}
84
85func TestP2PConfigValidateBasic(t *testing.T) {
86 cfg := TestP2PConfig()

Callers

nothing calls this directly

Calls 3

TestRPCConfigFunction · 0.85
ValidateBasicMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…