summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-12-06 10:32:50 +0000
committerSteve Kemp <steve@steve.org.uk>2012-12-06 10:32:50 +0000
commit08597e725f3a31fa205b4f94ede9662c695f3d54 (patch)
treee2bb6af41a1a6f6e6f1777d23c2d9eff05f64740
parent63d05835f3c9605ff82a0dc739c08ad0f134038d (diff)
We don't set the .detail field unless we're raising an alert.
This will mean historically we can see what the failure reason was.
-rw-r--r--lib/custodian/alerts/mauve.rb17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/custodian/alerts/mauve.rb b/lib/custodian/alerts/mauve.rb
index 300c90c..7c2c89d 100644
--- a/lib/custodian/alerts/mauve.rb
+++ b/lib/custodian/alerts/mauve.rb
@@ -175,13 +175,14 @@ module Custodian
alert.id = "#{test_type}-#{test_host}"
alert.subject = subject
alert.summary = "The #{test_type} test failed against #{test_host}"
- alert.detail = "<p>The #{test_type} test failed against #{test_host}.</p>"
#
# If we're raising then add the error
#
if ( failure )
+ alert.detail = "<p>The #{test_type} test failed against #{test_host}.</p>"
+
#
# The text from the job-defition
#
@@ -196,14 +197,14 @@ module Custodian
# Add the test-failure message
#
alert.detail = "#{alert.detail}<p>#{test.error()}</p>"
- end
- #
- # Determine if this is inside/outside the bytemark network
- #
- location = expand_inside_bytemark( test_host )
- if ( !location.nil? && location.length )
- alert.detail = "#{alert.detail}\n#{location}"
+ #
+ # Determine if this is inside/outside the bytemark network
+ #
+ location = expand_inside_bytemark( test_host )
+ if ( !location.nil? && location.length )
+ alert.detail = "#{alert.detail}\n#{location}"
+ end
end
#