Fix kapacitor alert handler generation tests

Signed-off-by: Deniz Kusefoglu <denizk@gmail.com>
pull/10616/head
Chris Goller 2017-11-30 14:50:42 -06:00
parent 0c12a413f7
commit 59d4724d88
1 changed files with 0 additions and 44 deletions

View File

@ -71,15 +71,6 @@ func TestAlertServices(t *testing.T) {
.tcp('myaddress:22')
`,
},
{
name: "Test tcp no argument",
rule: chronograf.AlertRule{
AlertHandlers: chronograf.AlertHandlers{
TCPs: []*chronograf.TCP{{}},
},
},
wantErr: true,
},
{
name: "Test log",
rule: chronograf.AlertRule{
@ -95,26 +86,6 @@ func TestAlertServices(t *testing.T) {
.log('/tmp/alerts.log')
`,
},
{
name: "Test log no argument",
rule: chronograf.AlertRule{
AlertHandlers: chronograf.AlertHandlers{
Log: []*chronograf.Log{{}},
},
},
wantErr: true,
},
{
name: "Test tcp no argument with other services",
rule: chronograf.AlertRule{
AlertHandlers: chronograf.AlertHandlers{
Slack: []*chronograf.Slack{{}},
TCPs: []*chronograf.TCP{{}},
Email: []*chronograf.Email{{}},
},
},
wantErr: true,
},
{
name: "Test http as post",
rule: chronograf.AlertRule{
@ -128,21 +99,6 @@ func TestAlertServices(t *testing.T) {
},
want: `alert()
.post('http://myaddress')
`,
},
{
name: "Test http no arguments",
rule: chronograf.AlertRule{
AlertHandlers: chronograf.AlertHandlers{
Posts: []*chronograf.Post{
{
URL: "",
},
},
},
},
want: `alert()
.post()
`,
},
{