From c75539560f935ebad049e9fd6a110bfaf4d7e564 Mon Sep 17 00:00:00 2001 From: Ryan Uber Date: Sun, 12 Oct 2014 12:40:52 -0700 Subject: [PATCH] agent: test max retries in config --- command/agent/config_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/command/agent/config_test.go b/command/agent/config_test.go index 291f4022a..afaf2f668 100644 --- a/command/agent/config_test.go +++ b/command/agent/config_test.go @@ -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)))