features/notification_rules.feature in flapjack-0.7.11 vs features/notification_rules.feature in flapjack-0.7.12
- old
+ new
@@ -27,10 +27,11 @@
| email | sms |
| 15 | 60 |
And user 1 has the following notification rules:
| entities | entity_tags | warning_media | critical_media | warning_blackhole | critical_blackhole | time_restrictions |
+ | | | email | sms,email | true | true | |
| foo | | email | sms,email | | | 8-18 weekdays |
| bar | | | sms,email | true | | |
| baz | | email | sms,email | | | |
And user 2 has the following notification rules:
@@ -39,14 +40,14 @@
| | | sms | sms | | | |
| bar | | email | email,sms | | | |
And user 3 has the following notification rules:
| entities | entity_tags | warning_media | critical_media | warning_blackhole | critical_blackhole | time_restrictions |
- | buf | | email | email | | | |
- | buf | | sms | sms | | | |
| | | email | email | | | |
| baz | | sms | sms | | | |
+ | buf | | email | email | | | |
+ | buf | | sms | sms | | | |
@time_restrictions @time
Scenario: Alerts only during specified time restrictions
Given the timezone is Asia/Baghdad
And the time is February 1 2013 6:59
@@ -156,10 +157,26 @@
When 5 minutes passes
And a critical event is received
Then 2 email alerts should be queued for malak@example.com
@intervals @time
+ Scenario: Alerts according to custom interval with unknown
+ Given the check is check 'ping' on entity 'bar'
+ And the check is in an ok state
+ When an unknown event is received
+ Then no email alerts should be queued for malak@example.com
+ When 1 minute passes
+ And an unknown event is received
+ Then 1 email alert should be queued for malak@example.com
+ When 10 minutes passes
+ And an unknown event is received
+ Then 1 email alert should be queued for malak@example.com
+ When 5 minutes passes
+ And an unknown event is received
+ Then 2 email alerts should be queued for malak@example.com
+
+ @intervals @time
Scenario: Problem directly after Recovery should alert despite notification intervals
Given the check is check 'ping' on entity 'baz'
And the check is in an ok state
When a critical event is received
And 1 minute passes
@@ -171,9 +188,28 @@
And 2 sms alerts should be queued for +61400000001
When 1 minute passes
And a critical event is received
And 1 minute passes
And a critical event is received
+ Then 3 email alerts should be queued for malak@example.com
+ And 3 sms alerts should be queued for +61400000001
+
+ @intervals @time
+ Scenario: Problem directly after Recovery should alert despite notification intervals with unknown
+ Given the check is check 'ping' on entity 'baz'
+ And the check is in an ok state
+ When an unknown event is received
+ And 1 minute passes
+ And an unknown event is received
+ Then 1 email alert should be queued for malak@example.com
+ And 1 sms alert should be queued for +61400000001
+ When an ok event is received
+ Then 2 email alert should be queued for malak@example.com
+ And 2 sms alerts should be queued for +61400000001
+ When 1 minute passes
+ And an unknown event is received
+ And 1 minute passes
+ And an unknown event is received
Then 3 email alerts should be queued for malak@example.com
And 3 sms alerts should be queued for +61400000001
@time
Scenario: Contact with only entity specific rules should not be notified for other entities they are a contact for