change test files to reflect unexported newJsonParser func

This commit is contained in:
Max U 2018-06-28 15:39:39 -07:00
parent 4db667573a
commit 885193bc8f
1 changed files with 5 additions and 1 deletions

View File

@ -143,7 +143,11 @@ func TestConfig_LoadDirectory(t *testing.T) {
"Testdata did not produce correct memcached metadata.")
ex := inputs.Inputs["exec"]().(*exec.Exec)
p, err := parsers.NewJSONParser("exec", nil, nil, nil)
config := &parsers.Config{
MetricName: "exec",
DataFormat: "json",
}
p, err := parsers.NewParser(config)
assert.NoError(t, err)
ex.SetParser(p)
ex.Command = "/usr/bin/myothercollector --foo=bar"