Skip to content

Commit

Permalink
updated errors message if hostname response to A/AAAA records
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegPhenomenon committed Aug 29, 2023
1 parent d1289d7 commit 459db5c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ jobs:
bundle env
head -n1 $(which bundle)
# ARG CHROME_VERSION="81.0.4044.113-1"
# RUN wget --no-verbose -O /tmp/chrome.deb https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb \
# && apt install -y /tmp/chrome.deb \
# && rm /tmp/chrome.deb

- name: Install chrome version 114
run: |
wget security.debian.org/debian-security/pool/updates/main/c/chromium/chromium_114.0.5735.198~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
Expand Down
5 changes: 4 additions & 1 deletion app/interactions/actions/email_check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion test/application_system_test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class ApplicationSystemTestCase < ActionDispatch::IntegrationTest
include AbstractController::Translation
include Devise::Test::IntegrationHelpers

Webdrivers::Chromedriver.required_version = '116.0.5845.96'

teardown do
WebMock.reset!
Capybara.reset_sessions!
Expand All @@ -19,7 +21,7 @@ class ApplicationSystemTestCase < ActionDispatch::IntegrationTest
class JavaScriptApplicationSystemTestCase < ApplicationSystemTestCase
self.use_transactional_tests = false
DatabaseCleaner.strategy = :truncation
Webdrivers::Chromedriver.required_version = '114.0.5735.90'
Webdrivers::Chromedriver.required_version = '116.0.5845.96'

Capybara.register_driver(:chrome) do |app|
options = ::Selenium::WebDriver::Chrome::Options.new
Expand Down

0 comments on commit 459db5c

Please sign in to comment.