MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / TestMempoolConfigValidateBasic

Function TestMempoolConfigValidateBasic

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

Source from the content-addressed store, hash-verified

106}
107
108func TestMempoolConfigValidateBasic(t *testing.T) {
109 cfg := TestMempoolConfig()
110 assert.NoError(t, cfg.ValidateBasic())
111
112 fieldsToTest := []string{
113 "Size",
114 "MaxTxsBytes",
115 "CacheSize",
116 "MaxTxBytes",
117 }
118
119 for _, fieldName := range fieldsToTest {
120 reflect.ValueOf(cfg).Elem().FieldByName(fieldName).SetInt(-1)
121 assert.Error(t, cfg.ValidateBasic())
122 reflect.ValueOf(cfg).Elem().FieldByName(fieldName).SetInt(0)
123 }
124}
125
126func TestStateSyncConfigValidateBasic(t *testing.T) {
127 cfg := TestStateSyncConfig()

Callers

nothing calls this directly

Calls 3

TestMempoolConfigFunction · 0.85
ValidateBasicMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected