-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
spec_helper_acceptance_local.rb
39 lines (33 loc) · 1.03 KB
/
spec_helper_acceptance_local.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# frozen_string_literal: true
# SPDX-License-Identifier: AGPL-3.0-or-later
CONFIG_DIR = File.join('/etc', 'bind').freeze
PACKAGE_NAME = 'bind9'
SERVICE_NAME =
if os[:family] == 'debian' && os[:release].to_i == 10
'bind9'
else
'named'
end
WORKING_DIR = File.join('/var', 'cache', 'bind').freeze
shared_examples 'a DNS server' do
describe port(53) do
it { is_expected.to be_listening.with 'tcp' }
it { is_expected.to be_listening.with 'udp' }
end
end
# The initial installation can't be idempotent because the named.conf.* files don't exist until
# after the package is installed, so Puppet can't see that it needs to remove them with the tidy
# resource until the second run. Subsequent runs should be idempotent though.
shared_examples 'an idempotent resource after the initial run' do
it 'applies initially' do
apply_manifest(pp)
end
it 'applies idempotently' do
idempotent_apply(pp)
end
end
shared_examples 'an idempotent resource' do
it 'applies idempotently' do
idempotent_apply(pp)
end
end