Removes reap config option.
This commit is contained in:
parent
8c6439d379
commit
377ce12e53
|
@ -577,12 +577,6 @@ type Config struct {
|
|||
// Minimum Session TTL
|
||||
SessionTTLMin time.Duration `mapstructure:"-"`
|
||||
SessionTTLMinRaw string `mapstructure:"session_ttl_min"`
|
||||
|
||||
// Reap controls automatic reaping of child processes, useful if running
|
||||
// as PID 1 in a Docker container. This defaults to nil which will make
|
||||
// Consul reap only if it detects it's running as PID 1. If non-nil,
|
||||
// then this will be used to decide if reaping is enabled.
|
||||
Reap *bool `mapstructure:"reap"`
|
||||
}
|
||||
|
||||
// Bool is used to initialize bool pointers in struct literals.
|
||||
|
@ -1477,10 +1471,6 @@ func MergeConfig(a, b *Config) *Config {
|
|||
result.RetryJoinWan = append(result.RetryJoinWan, a.RetryJoinWan...)
|
||||
result.RetryJoinWan = append(result.RetryJoinWan, b.RetryJoinWan...)
|
||||
|
||||
if b.Reap != nil {
|
||||
result.Reap = b.Reap
|
||||
}
|
||||
|
||||
return &result
|
||||
}
|
||||
|
||||
|
|
|
@ -929,27 +929,6 @@ func TestDecodeConfig(t *testing.T) {
|
|||
if config.SessionTTLMin != 5*time.Second {
|
||||
t.Fatalf("bad: %s %#v", config.SessionTTLMin.String(), config)
|
||||
}
|
||||
|
||||
// Reap
|
||||
input = `{"reap": true}`
|
||||
config, err = DecodeConfig(bytes.NewReader([]byte(input)))
|
||||
if err != nil {
|
||||
t.Fatalf("err: %s", err)
|
||||
}
|
||||
|
||||
if config.Reap == nil || *config.Reap != true {
|
||||
t.Fatalf("bad: reap not enabled: %#v", config)
|
||||
}
|
||||
|
||||
input = `{}`
|
||||
config, err = DecodeConfig(bytes.NewReader([]byte(input)))
|
||||
if err != nil {
|
||||
t.Fatalf("err: %s", err)
|
||||
}
|
||||
|
||||
if config.Reap != nil {
|
||||
t.Fatalf("bad: reap not tri-stated: %#v", config)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDecodeConfig_invalidKeys(t *testing.T) {
|
||||
|
@ -1523,7 +1502,6 @@ func TestMergeConfig(t *testing.T) {
|
|||
RPC: &net.TCPAddr{},
|
||||
RPCRaw: "127.0.0.5:1233",
|
||||
},
|
||||
Reap: Bool(true),
|
||||
}
|
||||
|
||||
c := MergeConfig(a, b)
|
||||
|
|
Loading…
Reference in a new issue