Change test output to pass tests

pull/10616/head
deniz kusefoglu 2017-12-05 16:33:44 -08:00
parent 903e461d40
commit fd4e78ee7b
1 changed files with 24 additions and 24 deletions

View File

@ -149,41 +149,41 @@ alert4
}
func TestPipelineJSONDeadman(t *testing.T) {
script := `var db = 'telegraf'
var rp = 'autogen'
var measurement = 'cpu'
var groupBy = ['host', 'cluster_id']
var whereFilter = lambda: ("cpu" == 'cpu_total') AND ("host" == 'acc-0eabc309-eu-west-1-data-3' OR "host" == 'prod')
var period = 10m
var name = 'name'
var idVar = name + ':{{.Group}}'
var message = 'message'
var idTag = 'alertID'
var levelTag = 'level'
var messageField = 'message'
var durationField = 'duration'
var outputDB = 'chronograf'
var outputRP = 'autogen'
var outputMeasurement = 'alerts'
var triggerType = 'deadman'
var threshold = 0.0
var data = stream
|from()
.database(db)
@ -191,7 +191,7 @@ func TestPipelineJSONDeadman(t *testing.T) {
.measurement(measurement)
.groupBy(groupBy)
.where(whereFilter)
var trigger = data
|deadman(threshold, period)
.stateChangesOnly()
@ -204,7 +204,7 @@ func TestPipelineJSONDeadman(t *testing.T) {
.slack()
.victorOps()
.email()
trigger
|eval(lambda: "emitted")
.as('value')
@ -216,7 +216,7 @@ func TestPipelineJSONDeadman(t *testing.T) {
.measurement(outputMeasurement)
.tag('alertName', name)
.tag('triggerType', triggerType)
trigger
|httpOut('output')
`
@ -251,9 +251,6 @@ var alert5 = from1
.victorOps()
.slack()
alert5
|httpOut('output')
alert5
|eval(lambda: "emitted")
.as('value')
@ -268,6 +265,9 @@ alert5
.create()
.tag('alertName', 'name')
.tag('triggerType', 'deadman')
alert5
|httpOut('output')
`
octets, err := MarshalTICK(script)