features/steps/notifications_steps.rb in flapjack-0.7.28 vs features/steps/notifications_steps.rb in flapjack-0.7.29
- old
+ new
@@ -107,30 +107,34 @@
'name' => entity},
:redis => @redis )
@sms_notification = {'notification_type' => 'problem',
'contact_first_name' => 'John',
'contact_last_name' => 'Smith',
- 'state' => 'CRITICAL',
+ 'state' => 'critical',
'summary' => 'Socket timeout after 10 seconds',
'time' => Time.now.to_i,
'event_id' => "#{entity}:ping",
'address' => '+61412345678',
- 'id' => 1}
+ 'id' => 1,
+ 'state_duration' => 30,
+ 'duration' => 45}
end
Given /^a user email notification has been queued for entity '([\w\.\-]+)'$/ do |entity|
Flapjack::Data::Entity.add({'id' => '5001',
'name' => entity},
:redis => @redis )
@email_notification = {'notification_type' => 'problem',
'contact_first_name' => 'John',
'contact_last_name' => 'Smith',
- 'state' => 'CRITICAL',
+ 'state' => 'critical',
'summary' => 'Socket timeout after 10 seconds',
'time' => Time.now.to_i,
'event_id' => "#{entity}:ping",
'address' => 'johns@example.dom',
- 'id' => 2}
+ 'id' => 2,
+ 'state_duration' => 30,
+ 'duration' => 3600}
end
# NB using perform, the notifiers were accessing the wrong Redis DB number
# TODO may need to get more complex, depending which SMS provider is used