diff --git a/influxdb/influxdb_medium_test.go b/influxdb/influxdb_medium_test.go index adc9b78..4fe65a8 100644 --- a/influxdb/influxdb_medium_test.go +++ b/influxdb/influxdb_medium_test.go @@ -22,6 +22,7 @@ limitations under the License. package influxdb import ( + "math" "net/http" "os" "strings" @@ -251,6 +252,21 @@ func tests(scheme string, config plugin.Config) { So(err, ShouldBeNil) }) + Convey("Publish NaN value of metric via "+scheme, func() { + metrics := []plugin.Metric{ + { + Namespace: plugin.NewNamespace("nan"), + Timestamp: time.Now(), + Config: mcfg, + Tags: tags, + Unit: "nan unit", + Data: math.Log(-1.0), + }, + } + + So(func() { ip.Publish(metrics, config) }, ShouldNotPanic) + }) + Convey("Publish multiple fields to one metric via "+scheme, func() { config["isMultiFields"] = true metrics := []plugin.Metric{