From dff216c44d5fae38db0ae78a5dc67a320b5c5397 Mon Sep 17 00:00:00 2001 From: ingosus Date: Thu, 13 Apr 2017 22:59:28 +0300 Subject: [PATCH] Feature #1820: add testing without outputs (#2446) --- CHANGELOG.md | 1 + cmd/telegraf/telegraf.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2d9fc68e0f51..dd3ee39dfd63a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,6 +68,7 @@ be deprecated eventually. - [#2637](https://github.com/influxdata/telegraf/issues/2637): Add support for precision in http_listener - [#2636](https://github.com/influxdata/telegraf/pull/2636): Add `message_len_max` option to `kafka_consumer` input - [#1100](https://github.com/influxdata/telegraf/issues/1100): Add collectd parser +- [#1820](https://github.com/influxdata/telegraf/issues/1820): easier plugin testing without outputs ### Bugfixes diff --git a/cmd/telegraf/telegraf.go b/cmd/telegraf/telegraf.go index 40e90a1ec6b6b..af11e6682eb31 100644 --- a/cmd/telegraf/telegraf.go +++ b/cmd/telegraf/telegraf.go @@ -144,7 +144,7 @@ func reloadLoop( log.Fatal("E! " + err.Error()) } } - if len(c.Outputs) == 0 { + if !*fTest && len(c.Outputs) == 0 { log.Fatalf("E! Error: no outputs found, did you provide a valid config file?") } if len(c.Inputs) == 0 {