[deploy] Refactor:Change Unset Var Warnings to Debug Level (#9985)
This commit is contained in:
parent
38d7a7df28
commit
ad2184ebf6
2 changed files with 3 additions and 3 deletions
|
|
@ -5,7 +5,7 @@ class ApplicationConfig
|
|||
if ENV.key?(key)
|
||||
ENV[key]
|
||||
else
|
||||
Rails.logger.warn("Unset ENV variable: #{key}.")
|
||||
Rails.logger.debug("Unset ENV variable: #{key}.")
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ require "rails_helper"
|
|||
|
||||
describe ApplicationConfig do
|
||||
it "logs warning if key is not found" do
|
||||
allow(Rails.logger).to receive(:warn)
|
||||
allow(Rails.logger).to receive(:debug)
|
||||
described_class["missing"]
|
||||
expect(Rails.logger).to have_received(:warn).with("Unset ENV variable: missing.")
|
||||
expect(Rails.logger).to have_received(:debug).with("Unset ENV variable: missing.")
|
||||
end
|
||||
|
||||
describe ".app_domain_no_port" do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue