mirror of https://github.com/hashicorp/consul
update enforcing consecutive 5xx type to pointer type (#14592)
* update enforcing condecutive 5xx type to pointer type * update testpull/14597/head
parent
0aa13733a0
commit
e743eefbd1
|
@ -200,7 +200,7 @@ type PassiveHealthCheck struct {
|
||||||
// EnforcingConsecutive5xx is the % chance that a host will be actually ejected
|
// EnforcingConsecutive5xx is the % chance that a host will be actually ejected
|
||||||
// when an outlier status is detected through consecutive 5xx.
|
// when an outlier status is detected through consecutive 5xx.
|
||||||
// This setting can be used to disable ejection or to ramp it up slowly.
|
// This setting can be used to disable ejection or to ramp it up slowly.
|
||||||
EnforcingConsecutive5xx uint32 `json:",omitempty" alias:"enforcing_consecutive_5xx"`
|
EnforcingConsecutive5xx *uint32 `json:",omitempty" alias:"enforcing_consecutive_5xx"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpstreamLimits describes the limits that are associated with a specific
|
// UpstreamLimits describes the limits that are associated with a specific
|
||||||
|
|
|
@ -452,7 +452,8 @@ func TestDecodeConfigEntry(t *testing.T) {
|
||||||
"Name": "redis",
|
"Name": "redis",
|
||||||
"PassiveHealthCheck": {
|
"PassiveHealthCheck": {
|
||||||
"MaxFailures": 3,
|
"MaxFailures": 3,
|
||||||
"Interval": "2s"
|
"Interval": "2s",
|
||||||
|
"EnforcingConsecutive5xx": 60
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -502,8 +503,9 @@ func TestDecodeConfigEntry(t *testing.T) {
|
||||||
{
|
{
|
||||||
Name: "redis",
|
Name: "redis",
|
||||||
PassiveHealthCheck: &PassiveHealthCheck{
|
PassiveHealthCheck: &PassiveHealthCheck{
|
||||||
MaxFailures: 3,
|
MaxFailures: 3,
|
||||||
Interval: 2 * time.Second,
|
Interval: 2 * time.Second,
|
||||||
|
EnforcingConsecutive5xx: uint32Pointer(60),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -1381,3 +1383,7 @@ func TestDecodeConfigEntry(t *testing.T) {
|
||||||
func intPointer(v int) *int {
|
func intPointer(v int) *int {
|
||||||
return &v
|
return &v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func uint32Pointer(v uint32) *uint32 {
|
||||||
|
return &v
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue