From 375f88d3bba036a6b6555fbf9f6d5b45626ba1d1 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Wed, 18 Feb 2015 04:25:29 +0000 Subject: 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. --- lib/custodian/alerts/redis-state.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/custodian') 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 ) -- cgit v1.2.1