Skip to content

Commit

Permalink
Improve test case coverage for listen-on directive
Browse files Browse the repository at this point in the history
  • Loading branch information
smoeding committed Nov 16, 2023
1 parent b50bbfb commit 18a666f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/defines/listen_on_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
.with_target('named.conf.options')
.with_order('11')
.with_address_match_list('127.0.0.1')

is_expected.to contain_concat__fragment('bind::named.conf.options::listen-on')
.with_target('named.conf.options')
.with_order('11')
.with_content(" listen-on { 127.0.0.1; };\n\n")
}
end

Expand All @@ -30,6 +35,11 @@
.with_target('named.conf.options')
.with_order('12')
.with_address_match_list('127.0.0.1')

is_expected.to contain_concat__fragment('bind::named.conf.options::listen-on port 53')
.with_target('named.conf.options')
.with_order('12')
.with_content(" listen-on port 53 { 127.0.0.1; };\n\n")
}
end

Expand Down
10 changes: 10 additions & 0 deletions spec/defines/listen_on_v6_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
.with_target('named.conf.options')
.with_order('13')
.with_address_match_list('::1')

is_expected.to contain_concat__fragment('bind::named.conf.options::listen-on-v6')
.with_target('named.conf.options')
.with_order('13')
.with_content(" listen-on-v6 { ::1; };\n\n")
}
end

Expand All @@ -30,6 +35,11 @@
.with_target('named.conf.options')
.with_order('14')
.with_address_match_list('::1')

is_expected.to contain_concat__fragment('bind::named.conf.options::listen-on-v6 port 53')
.with_target('named.conf.options')
.with_order('14')
.with_content(" listen-on-v6 port 53 { ::1; };\n\n")
}
end

Expand Down

0 comments on commit 18a666f

Please sign in to comment.