diff --git a/command/agent/config_test.go b/command/agent/config_test.go index 89239fe74..6e0c446b2 100644 --- a/command/agent/config_test.go +++ b/command/agent/config_test.go @@ -1418,6 +1418,13 @@ func TestReadConfigPaths_dir(t *testing.T) { t.Fatalf("err: %s", err) } + // An empty file shouldn't be read + err = ioutil.WriteFile(filepath.Join(td, "d.json"), + []byte{}, 0664) + if err != nil { + t.Fatalf("err: %s", err) + } + config, err := ReadConfigPaths([]string{td}) if err != nil { t.Fatalf("err: %s", err)