From e8322ffe006d048f2e6e22cafdb6b48a957bd6ed Mon Sep 17 00:00:00 2001 From: James Phillips Date: Fri, 31 Jul 2015 09:20:14 -0700 Subject: [PATCH] Adds a test for the `DisableCoordinate` 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 37e0cf27dd..b7a107be6f 100644 --- a/command/agent/config_test.go +++ b/command/agent/config_test.go @@ -734,6 +734,17 @@ func TestDecodeConfig(t *testing.T) { 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 input = `{"session_ttl_min": "5s"}` config, err = DecodeConfig(bytes.NewReader([]byte(input)))