Add input for receiving papertrail webhooks (#2038)

This commit is contained in:
Ross McDonald
2017-04-17 15:49:36 -05:00
committed by Daniel Nelson
parent b7c34a3ff3
commit 018bb9d742
8 changed files with 351 additions and 4 deletions

View File

@@ -5,6 +5,7 @@ import (
"testing"
"github.com/influxdata/telegraf/plugins/inputs/webhooks/github"
"github.com/influxdata/telegraf/plugins/inputs/webhooks/papertrail"
"github.com/influxdata/telegraf/plugins/inputs/webhooks/rollbar"
)
@@ -26,4 +27,10 @@ func TestAvailableWebhooks(t *testing.T) {
if !reflect.DeepEqual(wb.AvailableWebhooks(), expected) {
t.Errorf("expected to be %v.\nGot %v", expected, wb.AvailableWebhooks())
}
wb.Papertrail = &papertrail.PapertrailWebhook{Path: "/papertrail"}
expected = append(expected, wb.Papertrail)
if !reflect.DeepEqual(wb.AvailableWebhooks(), expected) {
t.Errorf("expected to be %v.\nGot %v", expected, wb.AvailableWebhooks())
}
}