21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-04-25 13:33:04 +02:00

Do not automatically mark as inactive checks for domain not found

This renders explicit the failures after X fails, and notify the user.
This commit is contained in:
Colin Darie 2018-08-29 17:47:04 +02:00
parent 7a7ef4407b
commit 5d1fa13fba
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
2 changed files with 1 additions and 5 deletions

View file

@ -20,9 +20,6 @@ class WhoisSyncJob < ApplicationJob
return unless response.valid?
update_from_response(response)
rescue Whois::DomainNotFoundError
check.active = false
check.save!
end
def update_from_response(response)

View file

@ -60,7 +60,7 @@ class WhoisSyncJobTest < ActiveJob::TestCase
assert_equal 1, check.consecutive_failures
end
test "disable check when whois responds domain not found" do
test "increment consecutive failures when whois responds domain not found" do
domain = "willneverexist.fr"
check = create(:check, :nil_dates, domain: domain)
@ -70,7 +70,6 @@ class WhoisSyncJobTest < ActiveJob::TestCase
check.reload
refute check.active?
assert_just_now check.last_run_at
assert_nil check.last_success_at
assert_equal 1, check.consecutive_failures