From 96075acb271ebcc0d7e01ea2647ec0abb7eebcbb Mon Sep 17 00:00:00 2001 From: Oleg Hasjanov Date: Mon, 28 Aug 2023 15:11:02 +0300 Subject: [PATCH] updated errors message if hostname response to A/AAAA records --- .github/workflows/ruby.yml | 7 +++++++ app/interactions/actions/email_check.rb | 5 ++++- test/application_system_test_case.rb | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 7143a280d1..f02543b4f3 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -34,6 +34,13 @@ jobs: bundle env head -n1 $(which bundle) + - name: Install chrome version 114 + run: | + wget security.debian.org/debian-security/pool/updates/main/c/chromium/chromium_114.0.0.0-1~deb11u1_amd64.deb + sudo apt install ./google-chrome-stable_current_amd64.deb + google-chrome --version + + - name: Set ENV for codeclimate (pull_request) run: | git fetch --no-tags --prune --depth=1 origin +refs/heads/$GITHUB_HEAD_REF:refs/remotes/origin/$GITHUB_HEAD_REF diff --git a/app/interactions/actions/email_check.rb b/app/interactions/actions/email_check.rb index b15e4bad26..44f0fb4146 100644 --- a/app/interactions/actions/email_check.rb +++ b/app/interactions/actions/email_check.rb @@ -73,7 +73,10 @@ def handle_mx_validation(result) output_a_and_aaaa_validation_results(email: email, result: result_validation, type: 'AAAA') end - result.success = result_validation.present? + if result_validation.present? + result.success = true + result.errors.merge!({ mx: 'target host(s) not found, but was able to find A/AAAA records for domain'}) + end end def handle_saving_result(contact, result) diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb index 63c91fcde4..38c0dbd1bc 100644 --- a/test/application_system_test_case.rb +++ b/test/application_system_test_case.rb @@ -9,6 +9,8 @@ class ApplicationSystemTestCase < ActionDispatch::IntegrationTest include AbstractController::Translation include Devise::Test::IntegrationHelpers + Webdrivers::Chromedriver.required_version = '114.0.5735.90' + teardown do WebMock.reset! Capybara.reset_sessions!