• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / oawaiver / eedb38d9-74bc-4c3c-b4a3-d1fa0f62675c

24 Sep 2024 02:36PM UTC coverage: 98.795% (-1.2%) from 100.0%
eedb38d9-74bc-4c3c-b4a3-d1fa0f62675c

push

circleci

jrgriffiniii
wip

2 of 11 new or added lines in 1 file covered. (18.18%)

738 of 747 relevant lines covered (98.8%)

17.18 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

18.18
/app/checks/solr_status.rb
1
# frozen_string_literal: true
2

3
class SolrStatus < HealthMonitor::Providers::Base
1✔
4
  def check!
1✔
NEW
5
    url = Sunspot.config.solr.url
×
NEW
6
    uri = URI(url)
×
NEW
7
    status_uri = uri.dup
×
NEW
8
    status_uri.path = "/solr/admin/cores?action=STATUS"
×
9

NEW
10
    req = Net::HTTP::Get.new(status_uri)
×
NEW
11
    req.basic_auth(uri.user, uri.password) if uri.user && uri.password
×
NEW
12
    response = Net::HTTP.start(uri.hostname, uri.port) { |http| http.request(req) }
×
13

NEW
14
    json = JSON.parse(response.body)
×
NEW
15
    raise "The solr has an invalid status #{status_uri}" if json["responseHeader"]["status"] != 0
×
16
  end
17
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc