mirror of
https://github.com/status-im/consul.git
synced 2025-01-12 06:44:41 +00:00
Adds a test for the DisableCoordinate
config.
This commit is contained in:
parent
f9da231a1c
commit
e8322ffe00
@ -734,6 +734,17 @@ func TestDecodeConfig(t *testing.T) {
|
|||||||
t.Fatalf("bad: %#v", config)
|
t.Fatalf("bad: %#v", config)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Coordinate disable
|
||||||
|
input = `{"disable_coordinates": true}`
|
||||||
|
config, err = DecodeConfig(bytes.NewReader([]byte(input)))
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("err: %s", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if config.DisableCoordinates != true {
|
||||||
|
t.Fatalf("bad: coordinates not disabled: %#v", config)
|
||||||
|
}
|
||||||
|
|
||||||
// SessionTTLMin
|
// SessionTTLMin
|
||||||
input = `{"session_ttl_min": "5s"}`
|
input = `{"session_ttl_min": "5s"}`
|
||||||
config, err = DecodeConfig(bytes.NewReader([]byte(input)))
|
config, err = DecodeConfig(bytes.NewReader([]byte(input)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user