Add prometheus round trip unit tests (#6720)

This commit is contained in:
Daniel Nelson
2019-11-26 17:31:36 -08:00
committed by GitHub
parent 80c5edd48e
commit 10db774db3
13 changed files with 935 additions and 456 deletions

View File

@@ -1,10 +1,12 @@
package syslog
import (
"time"
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/internal"
framing "github.com/influxdata/telegraf/internal/syslog"
"github.com/influxdata/telegraf/testutil"
"time"
)
var (
@@ -14,16 +16,16 @@ var (
type testCasePacket struct {
name string
data []byte
wantBestEffort *testutil.Metric
wantStrict *testutil.Metric
wantBestEffort telegraf.Metric
wantStrict telegraf.Metric
werr bool
}
type testCaseStream struct {
name string
data []byte
wantBestEffort []testutil.Metric
wantStrict []testutil.Metric
wantBestEffort []telegraf.Metric
wantStrict []telegraf.Metric
werr int // how many errors we expect in the strict mode?
}