allow for import from plugins/all
This commit is contained in:
parent
9c845950a7
commit
cc406299ba
|
@ -86,6 +86,7 @@ import (
|
|||
_ "github.com/influxdata/telegraf/plugins/inputs/rabbitmq"
|
||||
_ "github.com/influxdata/telegraf/plugins/inputs/raindrops"
|
||||
_ "github.com/influxdata/telegraf/plugins/inputs/reader"
|
||||
_ "github.com/influxdata/telegraf/plugins/inputs/redis"
|
||||
_ "github.com/influxdata/telegraf/plugins/inputs/rethinkdb"
|
||||
_ "github.com/influxdata/telegraf/plugins/inputs/riak"
|
||||
_ "github.com/influxdata/telegraf/plugins/inputs/salesforce"
|
||||
|
|
|
@ -26,12 +26,10 @@ func TestJSONParserCompile(t *testing.T) {
|
|||
var acc testutil.Accumulator
|
||||
r := Reader{
|
||||
Filepaths: []string{testDir + "/reader/testfiles/json_a.log"},
|
||||
DataFormat: "json",
|
||||
Tags: []string{"parent_ignored_child"},
|
||||
}
|
||||
parserConfig := parsers.Config{
|
||||
DataFormat: r.DataFormat,
|
||||
TagKeys: r.Tags,
|
||||
DataFormat: "json",
|
||||
TagKeys: []string{"parent_ignored_child"},
|
||||
}
|
||||
nParser, err := parsers.NewParser(&parserConfig)
|
||||
r.parser = nParser
|
||||
|
@ -48,13 +46,11 @@ func TestGrokParser(t *testing.T) {
|
|||
var acc testutil.Accumulator
|
||||
r := Reader{
|
||||
Filepaths: []string{testDir + "/reader/testfiles/grok_a.log"},
|
||||
DataFormat: "grok",
|
||||
}
|
||||
|
||||
parserConfig := parsers.Config{
|
||||
DataFormat: r.DataFormat,
|
||||
TagKeys: r.Tags,
|
||||
Patterns: []string{"{%COMMON-LOG-FORMAT}"},
|
||||
DataFormat: "grok",
|
||||
Patterns: []string{"%{COMMON_LOG_FORMAT}"},
|
||||
}
|
||||
|
||||
nParser, err := parsers.NewParser(&parserConfig)
|
||||
|
@ -67,7 +63,6 @@ func TestGrokParser(t *testing.T) {
|
|||
log.Printf("metric[0]_tags: %v, metric[0]_fields: %v", acc.Metrics[0].Tags, acc.Metrics[0].Fields)
|
||||
log.Printf("metric[1]_tags: %v, metric[1]_fields: %v", acc.Metrics[1].Tags, acc.Metrics[1].Fields)
|
||||
assert.Equal(t, 2, len(acc.Metrics))
|
||||
t.Error()
|
||||
}
|
||||
|
||||
func getPluginDir() string {
|
||||
|
|
Loading…
Reference in New Issue