File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -18,11 +18,24 @@ def check
1818 end
1919end
2020
21+ class CustomMailerCheck < OkComputer ::Check
22+ # Check that the mail password is set
23+ def check
24+ if ENV [ 'MAIL_PASSWORD' ] . present?
25+ mark_message 'Environment variable MAIL_PASSWORD is set.'
26+ else
27+ mark_failure
28+ mark_message 'Environment variable MAIL_PASSWORD is not set!'
29+ end
30+ end
31+ end
32+
2133# Ensure Alma API is working.
2234OkComputer ::Registry . register 'alma-patron-lookup' , AlmaPatronCheck . new
2335
2436# Ensure database migrations have been run.
2537OkComputer ::Registry . register 'database-migrations' , OkComputer ::ActiveRecordMigrationsCheck . new
2638
2739# Ensure connectivity to the mail system.
40+ OkComputer ::Registry . register 'custom-mailer' , CustomMailerCheck . new
2841OkComputer ::Registry . register 'action-mailer' , OkComputer ::ActionMailerCheck . new
Original file line number Diff line number Diff line change 1212 get '/health'
1313 expect ( response . parsed_body . keys ) . to match_array %w[
1414 action-mailer
15+ custom-mailer
1516 alma-patron-lookup
1617 default
1718 database
You can’t perform that action at this time.
0 commit comments