Skip to content

Commit

Permalink
Merge pull request #66 from influxdb/nc-issue#64
Browse files Browse the repository at this point in the history
fix influxdb out tags
  • Loading branch information
Nathaniel Cook committed Nov 23, 2015
2 parents be34722 + 90da3da commit 000415d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions integrations/streamer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1624,6 +1624,7 @@ stream
.retentionPolicy('rp')
.measurement('m')
.precision('s')
.tag('key', 'value')
`
done := make(chan error, 1)
var points []imodels.Point
Expand Down Expand Up @@ -1688,8 +1689,11 @@ stream
if p.Fields()["count"] != 10.0 {
t.Errorf("got %v exp %v", p.Fields()["count"], 10.0)
}
if len(p.Tags()) != 0 {
t.Errorf("got %v exp %v", len(p.Tags()), 0)
if len(p.Tags()) != 1 {
t.Errorf("got %v exp %v", len(p.Tags()), 1)
}
if p.Tags()["key"] != "value" {
t.Errorf("got %s exp %s", p.Tags()["key"], "value")
}
tm := time.Date(1971, 1, 1, 0, 0, 10, 0, time.UTC)
if !tm.Equal(p.Time()) {
Expand Down
1 change: 1 addition & 0 deletions pipeline/influxdb_out.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func newInfluxDBOutNode(wants EdgeType) *InfluxDBOutNode {
wants: wants,
provides: NoEdge,
},
Tags: make(map[string]string),
}
}

Expand Down

0 comments on commit 000415d

Please sign in to comment.