agent: test max retries in config

This commit is contained in:
Ryan Uber 2014-10-12 12:40:52 -07:00
parent 1ec68be726
commit c75539560f

View file

@ -296,6 +296,17 @@ func TestDecodeConfig(t *testing.T) {
t.Fatalf("bad: %#v", config) t.Fatalf("bad: %#v", config)
} }
// Retry Max
input = `{"retry_max": 3}`
config, err = DecodeConfig(bytes.NewReader([]byte(input)))
if err != nil {
t.Fatalf("err: %s", err)
}
if config.RetryMaxAttempts != 3 {
t.Fatalf("bad: %#v", config)
}
// UI Dir // UI Dir
input = `{"ui_dir": "/opt/consul-ui"}` input = `{"ui_dir": "/opt/consul-ui"}`
config, err = DecodeConfig(bytes.NewReader([]byte(input))) config, err = DecodeConfig(bytes.NewReader([]byte(input)))