Skip to content

Commit

Permalink
Merge pull request #747 from kylerisse/expand_serverspec_dns
Browse files Browse the repository at this point in the history
[READY] Fix recursive lookups against IPv6 interface of core master
  • Loading branch information
sarcasticadmin authored Mar 17, 2024
2 parents 60261ed + 095ef90 commit dea2047
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nix/machines/core/master.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ in
services = {
bind = {
enable = true;
cacheNetworks = [ "::1/128" "127.0.0.0/8" "2001:470:f0fb::/48" "10.0.0.0/8" ];
cacheNetworks = [ "::1/128" "127.0.0.0/8" "2001:470:f026::/48" "10.0.0.0/8" ];
forwarders = [ "8.8.8.8" "8.8.4.4" ];
zones =
{
Expand Down
18 changes: 15 additions & 3 deletions tests/serverspec/spec/shared/dns/resolvable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,29 @@

RSpec.shared_examples "resolvable" do

DNSSERVERS = [
"10.0.3.5",
"10.128.3.5",
"2001:470:f026:103::5",
"2001:470:f026:503::5"
]

RESOLVABLE=[
"ntp.scale.lan",
"loghost.scale.lan",
"zabbix.scale.lan",
"lobste.rs",
"google.com"
]


RESOLVABLE.each do |host|
describe command("dig +short #{host} | grep -v -e '^$'") do
its(:exit_status) { should eq 0 }
DNSSERVERS.each do |dnsserver|
describe command("dig @#{dnsserver} +short #{host} A | grep -v -e '^$'") do
its(:exit_status) { should eq 0 }
end
describe command("dig @#{dnsserver} +short #{host} AAAA | grep -v -e '^$'") do
its(:exit_status) { should eq 0 }
end
end
end
end

0 comments on commit dea2047

Please sign in to comment.