push
circleci
0 of 33 new or added lines in 1 file covered. (0.0%)
9374 existing lines in 213 files now uncovered.47 of 9753 relevant lines covered (0.48%)
0.01 hits per line
| 1 |
# frozen_string_literal: true
|
|
|
UNCOV
2
|
class AeonStatus < HealthMonitor::Providers::Base |
× |
|
UNCOV
3
|
attr_accessor :critical
|
× |
|
UNCOV
4
|
def initialize |
× |
|
UNCOV
5
|
super
|
× |
|
UNCOV
6
|
@critical = false |
× |
|
UNCOV
7
|
end
|
× |
| 8 |
|
|
|
UNCOV
9
|
def check! |
× |
|
UNCOV
10
|
base_uri = Requests.config[:aeon_base] |
× |
|
UNCOV
11
|
status_host = base_uri[0, base_uri.rindex("/")] |
× |
|
UNCOV
12
|
status_uri = URI("#{status_host}/aeon/api/SystemInformation/Version")
|
× |
|
UNCOV
13
|
req = Net::HTTP::Get.new(status_uri) |
× |
|
UNCOV
14
|
response = Net::HTTP.start(status_uri.hostname, status_uri.port, use_ssl: true) { |http| http.request(req) } |
× |
|
UNCOV
15
|
raise "Aeon has an invalid status" unless response.code == "200" |
× |
|
UNCOV
16
|
end
|
× |
|
UNCOV
17
|
end
|
× |