(t *testing.T)
| 62 | } |
| 63 | |
| 64 | func 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 | |
| 85 | func TestP2PConfigValidateBasic(t *testing.T) { |
| 86 | cfg := TestP2PConfig() |
nothing calls this directly
no test coverage detected
searching dependent graphs…