Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Making it even better by condensing it to a single monitor string set for error checking

Co-authored-by: Jeremy Friesen <[email protected]>
  • Loading branch information
aprilrieger and jeremyf authored Mar 29, 2024
1 parent d0b1009 commit 91344be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/fcrepo_endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def ping
).response.success?
"Fedora is OK"
else
"Fedora is Down"
"Error checking Fedora status: Fedora is Down"
end
rescue StandardError => e
"Error checking Fedora status: #{e.message}"
Expand Down
2 changes: 1 addition & 1 deletion spec/models/fcrepo_endpoint_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

it 'returns "Fedora is Down"' do
allow(ActiveFedora::Fedora.instance.connection).to receive(:head).with(url_prefix).and_return(failure_response)
expect(subject.ping).to eq("Fedora is Down")
expect(subject.ping).to eq("Error checking Fedora status: Fedora is Down")
end
end

Expand Down

0 comments on commit 91344be

Please sign in to comment.