aboutsummaryrefslogtreecommitdiff
path: root/test/tc_mauve_alert_changed.rb
diff options
context:
space:
mode:
authorAlex Young <alex@bytemark.co.uk>2015-02-23 19:22:33 +0000
committerAlex Young <alex@bytemark.co.uk>2015-02-23 19:22:33 +0000
commit16ba9f08109ddb911e9aba8518a93d3df710a46b (patch)
tree0d7835a257ad5a4c47af47f6a2f7b67fe076f287 /test/tc_mauve_alert_changed.rb
parentb212665b4e5ecaf9652ab7d3cfcd20597b3ef436 (diff)
Get tests passing on ruby 1.9.3-p551
Diffstat (limited to 'test/tc_mauve_alert_changed.rb')
-rw-r--r--test/tc_mauve_alert_changed.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/tc_mauve_alert_changed.rb b/test/tc_mauve_alert_changed.rb
index 679b9bb..6c5520c 100644
--- a/test/tc_mauve_alert_changed.rb
+++ b/test/tc_mauve_alert_changed.rb
@@ -49,15 +49,17 @@ alert_group("test_group") {
}
EOF
+
Configuration.current = ConfigurationBuilder.parse(config)
notification_buffer = Configuration.current.notification_methods["email"].deliver_to_queue
Server.instance.setup
+
alert = Alert.new(:source => "test", :alert_id => "test_alert", :summary => "test alert")
alert.raise!
- reminders = 1
+ reminders = 1
notifications = 1
mins = 0
@@ -146,7 +148,7 @@ EOF
Timecop.freeze(Time.now + 10.minutes)
AlertChanged.all.each{|ac| ac.poll}
assert_equal(2, notification_buffer.length, "Extra notifications sent when alertchangeds are polled.")
-
+
#
# OK if we poll the alert now it should be re-raised.
#
@@ -202,7 +204,7 @@ EOF
#
# Raise and clear the alert multiple times.
#
- 5.times do
+ 5.times do
alert.raise!
Timecop.freeze(Time.now + 15.minutes)
alert.clear!