Skip to content

Commit

Permalink
Nomarize dualstack dns name (output warning)
Browse files Browse the repository at this point in the history
  • Loading branch information
Genki Sugawara committed Jul 24, 2016
1 parent 1d6796f commit 7e6d397
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/roadworker/route53-wrapper.rb
Expand Up @@ -225,6 +225,16 @@ def eql?(expected_record)
when :dns_name
expected[0] = expected[0].downcase.sub(/\.\z/, '')
actual[0] = actual[0].downcase.sub(/\.\z/, '')

if actual[0] =~ /\Adualstack\./i
log(:warn, "`dualstack` prefix is used in the actual DNS name", :yellow) do
log_id = [self.name, self.type].join(' ')
rrset_setid = self.set_identifier
rrset_setid ? (log_id + " (#{rrset_setid})") : log_id
end

actual[0].sub!(/\Adualstack\./i, '')
end
end

(expected == actual)
Expand Down

0 comments on commit 7e6d397

Please sign in to comment.