easymon 1.3 → 1.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of easymon might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/README.md +2 -2
- data/lib/easymon/checks/redis_check.rb +1 -1
- data/lib/easymon/version.rb +1 -1
- data/test/controllers/easymon/checks_controller_test.rb +5 -5
- data/test/dummy/log/test.log +1777 -1718
- metadata +41 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 995c7954f5c5d720f9840c0f93b1d673de2e6a6682c7a134336cac6d21f2a280
|
4
|
+
data.tar.gz: 7cbce9feb1e3a4f4fc7c661a5597314fb2107e3ac36d5ee84cfa2810c218dc75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c805aec0b3a45ac5e289ffe5fe7f17e85abb250dbd31d09787e1e3912e11d4040a3a7aa9c04018fc8dfe4febc3e0aaeb638f4ef4e4a65eea8d0250d2fb60b090
|
7
|
+
data.tar.gz: 2763483c3faf6714ccfbc3ea055bb985a9ed0a125527e41ec9e72e25946a85979794590c6886fa42259c9e1fa6dbac99b441ac575ef89a3bfbebdf7c8d8372b0
|
data/README.md
CHANGED
@@ -173,7 +173,7 @@ check = Easymon::SemaphoreCheck.new("config/redis.yml")
|
|
173
173
|
|
174
174
|
This is mainly a check that gets subclassed by the next check.
|
175
175
|
|
176
|
-
###Traffic Enabled
|
176
|
+
### Traffic Enabled
|
177
177
|
`Easymon::TrafficEnabledCheck` is fairly specific, but when we want a server to
|
178
178
|
accept traffic, we can place a file in the Rails.root, and the load balancers
|
179
179
|
can use the result of this check to help decide whether or not to send traffic
|
@@ -184,7 +184,7 @@ Easymon::TrafficEnabledCheck.new("enable-traffic")
|
|
184
184
|
````
|
185
185
|
This is a subclass of the Semaphore check mentioned above.
|
186
186
|
|
187
|
-
###Split ActiveRecord
|
187
|
+
### Split ActiveRecord
|
188
188
|
`Easymon::SplitActiveRecordCheck` is the most complicated check, as it's not
|
189
189
|
something you can use out of the gate. Here we pass a block so we get a fresh
|
190
190
|
instance of `ActiveRecord::Base` or whatever other class we might be using to
|
data/lib/easymon/version.rb
CHANGED
@@ -61,14 +61,14 @@ module Easymon
|
|
61
61
|
|
62
62
|
test "show when the check passes" do
|
63
63
|
Easymon::Repository.add("database", Easymon::ActiveRecordCheck.new(ActiveRecord::Base))
|
64
|
-
get :show, check: "database"
|
64
|
+
get :show, :params => { check: "database" }
|
65
65
|
assert_response :success
|
66
66
|
assert response.body.include?("Up"), "Response should include message text, got #{response.body}"
|
67
67
|
end
|
68
68
|
|
69
69
|
test "show json when the check passes" do
|
70
70
|
Easymon::Repository.add("database", Easymon::ActiveRecordCheck.new(ActiveRecord::Base))
|
71
|
-
get :show, :check => "database", :format => :json
|
71
|
+
get :show, :params => { :check => "database", :format => :json }
|
72
72
|
|
73
73
|
json = JSON.parse(response.body)
|
74
74
|
|
@@ -80,7 +80,7 @@ module Easymon
|
|
80
80
|
Easymon::Repository.add("database", Easymon::ActiveRecordCheck.new(ActiveRecord::Base))
|
81
81
|
ActiveRecord::Base.connection.stubs(:active?).raises("boom")
|
82
82
|
|
83
|
-
get :show, :check => "database"
|
83
|
+
get :show, :params => { :check => "database" }
|
84
84
|
|
85
85
|
assert_response :service_unavailable
|
86
86
|
assert response.body.include?("Down"), "Response should include failure text, got #{response.body}"
|
@@ -89,7 +89,7 @@ module Easymon
|
|
89
89
|
test "show if the check is not found" do
|
90
90
|
Easymon::Repository.names.each {|name| Easymon::Repository.remove(name)}
|
91
91
|
|
92
|
-
get :show, :check => "database"
|
92
|
+
get :show, :params => { :check => "database" }
|
93
93
|
assert_response :not_found
|
94
94
|
end
|
95
95
|
|
@@ -99,7 +99,7 @@ module Easymon
|
|
99
99
|
get :index
|
100
100
|
assert_response :forbidden
|
101
101
|
|
102
|
-
get :show, :check => "database"
|
102
|
+
get :show, :params => { :check => "database" }
|
103
103
|
assert_response :forbidden
|
104
104
|
end
|
105
105
|
end
|