New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add command to validate authoritative DNS for providers #162
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't flag:
Zone: shopify.cn
- NS1: authoritative nameservers not found for configured provider
- Unknown: unknown authoritative nameservers found
- dns4.g01.ns1global.org.
- dns1.g01.ns1global.org.
- dns2.g01.ns1global.org.
- dns3.g01.ns1global.org.
Probably would require other when
there?
https://github.com/Shopify/record_store/pull/162/files/5aec3bc28217343f9cad4764be0d68753ea4e7f9#diff-5f6190009b4d6922fcd1b3bf4862de14R27-R28
when /\.nsone\.net\z/
when /\.ns1global\.org\z/
when /\.ns1global\.net\z/
'NS1'
case object | ||
when Record::NS | ||
object.nsdname.chomp('.') | ||
else | ||
begin | ||
master_nameserver_for(object) | ||
rescue Resolv::ResolvError | ||
$stderr.puts "Domain doesn't exist (#{object})" | ||
return | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why a case here instead of simple if
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to easily match the types... and I'd originally considered when String
for the current else case
I can definitely switch to if object.is_a?(Record::NS)
instead 🤷
this PR adds a
validate_authority
command to verify provider delegation to authoritative nameserversexample output...