alertmanager/test/misc_test.go

34 lines
498 B
Go
Raw Normal View History

2015-09-29 18:45:38 +00:00
package test
import (
"testing"
)
var somethingConfig = `
routes:
- send_to: "default"
notification_configs:
- name: "default"
webhook_configs:
- url: 'http://localhost:8088'
`
func TestSomething(T *testing.T) {
t := NewE2ETest(T, &E2ETestOpts{
2015-09-29 20:40:44 +00:00
timeFactor: 0.5,
2015-09-29 18:45:38 +00:00
conf: somethingConfig,
})
2015-09-29 20:40:44 +00:00
am := t.alertmanager()
co := t.collector()
2015-09-29 18:45:38 +00:00
2015-09-29 20:40:44 +00:00
go runMockWebhook(":8088", co)
am.push(at(1), alert("alertname", "test"))
co.want(between(2, 4), alert("alertname", "test"))
2015-09-29 18:45:38 +00:00
t.Run()
}