From 8e67c37398151c332f882de3dfd687971eb17d49 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 37e0cf27d..b7a107be6 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)))