diff options
| author | Steve Kemp <steve@steve.org.uk> | 2015-02-18 04:25:29 +0000 | 
|---|---|---|
| committer | Steve Kemp <steve@steve.org.uk> | 2015-02-18 04:25:29 +0000 | 
| commit | 843622bcdb0f52abf7c6f6655e070b7f15bccfe0 (patch) | |
| tree | 74c2eed56ae4a99d531a3ac7736db127a737b549 | |
| parent | 672f39245744ad3fdaf37afa9b39d7d5327aad7e (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.
| -rw-r--r-- | lib/custodian/alerts/redis-state.rb | 4 | 
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 ) | 
