provider/datadog Add test for no_data_timeframe. (#6765)

This commit is contained in:
Otto Jongerius 2016-05-19 23:51:27 +10:00 committed by Paul Stack
parent 6ec8fc8675
commit 58e1c94335
1 changed files with 8 additions and 5 deletions

View File

@ -30,7 +30,7 @@ func TestAccDatadogMonitor_Basic(t *testing.T) {
resource.TestCheckResourceAttr(
"datadog_monitor.foo", "query", "avg(last_1h):avg:aws.ec2.cpu{environment:foo,host:foo} by {host} > 2"),
resource.TestCheckResourceAttr(
"datadog_monitor.foo", "notify_no_data", "true"),
"datadog_monitor.foo", "notify_no_data", "false"),
resource.TestCheckResourceAttr(
"datadog_monitor.foo", "renotify_interval", "60"),
resource.TestCheckResourceAttr(
@ -70,7 +70,7 @@ func TestAccDatadogMonitor_Updated(t *testing.T) {
resource.TestCheckResourceAttr(
"datadog_monitor.foo", "type", "metric alert"),
resource.TestCheckResourceAttr(
"datadog_monitor.foo", "notify_no_data", "true"),
"datadog_monitor.foo", "notify_no_data", "false"),
resource.TestCheckResourceAttr(
"datadog_monitor.foo", "renotify_interval", "60"),
resource.TestCheckResourceAttr(
@ -106,7 +106,9 @@ func TestAccDatadogMonitor_Updated(t *testing.T) {
resource.TestCheckResourceAttr(
"datadog_monitor.foo", "type", "metric alert"),
resource.TestCheckResourceAttr(
"datadog_monitor.foo", "notify_no_data", "false"),
"datadog_monitor.foo", "notify_no_data", "true"),
resource.TestCheckResourceAttr(
"datadog_monitor.foo", "no_data_timeframe", "20"),
resource.TestCheckResourceAttr(
"datadog_monitor.foo", "renotify_interval", "40"),
resource.TestCheckResourceAttr(
@ -201,7 +203,7 @@ resource "datadog_monitor" "foo" {
critical = 2
}
notify_no_data = true
notify_no_data = false
renotify_interval = 60
notify_audit = false
@ -227,7 +229,8 @@ resource "datadog_monitor" "foo" {
critical = 3
}
notify_no_data = false
notify_no_data = true
no_data_timeframe = 20
renotify_interval = 40
escalation_message = "the situation has escalated! @pagerduty"
notify_audit = true