summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-02-18 04:25:29 +0000
committerSteve Kemp <steve@steve.org.uk>2015-02-18 04:25:29 +0000
commit375f88d3bba036a6b6555fbf9f6d5b45626ba1d1 (patch)
treeaf8851eba7e4b55a2b9cad3683fd546486a95ade /lib
parent8312615574ab9b0d72b94bf6fe9dba13eabc0b6f (diff)
Store the test-class in the redis-state.
We need to do this such that we can show all possible results of a test in the status-page. There might be three back-ends with different results and if we filter by class-type we'll be able to see that.
Diffstat (limited to 'lib')
-rw-r--r--lib/custodian/alerts/redis-state.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/custodian/alerts/redis-state.rb b/lib/custodian/alerts/redis-state.rb
index 2c3d319..03b31fa 100644
--- a/lib/custodian/alerts/redis-state.rb
+++ b/lib/custodian/alerts/redis-state.rb
@@ -59,8 +59,9 @@ module Custodian
tmp["type"] = @test.get_type
tmp["target"] = @test.target
tmp["result"] = "RAISE"
- tmp["reason"] = @test.error()
+ tmp["reason"] = @test.error()
tmp["test" ] = @test.to_s
+ tmp["class" ] = @test.class
@redis.lpush( "recent-tests", tmp.to_json)
@redis.ltrim( "recent-tests", 0, 100 )
@@ -84,6 +85,7 @@ module Custodian
tmp["result"] = "OK"
tmp["reason"] = ""
tmp["test" ] = @test.to_s
+ tmp["class" ] = @test.class
@redis.lpush( "recent-tests", tmp.to_json)
@redis.ltrim( "recent-tests", 0, 100 )