(t *testing.T)
| 106 | } |
| 107 | |
| 108 | func 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 | |
| 126 | func TestStateSyncConfigValidateBasic(t *testing.T) { |
| 127 | cfg := TestStateSyncConfig() |
nothing calls this directly
no test coverage detected