agent: test max retries in config

This commit is contained in:
Ryan Uber 2014-10-12 12:40:52 -07:00
parent 62b4752804
commit 599d0558e7
1 changed files with 11 additions and 0 deletions

View File

@ -296,6 +296,17 @@ func TestDecodeConfig(t *testing.T) {
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
input = `{"ui_dir": "/opt/consul-ui"}`
config, err = DecodeConfig(bytes.NewReader([]byte(input)))