Skip to content

Commit 33c4260

Browse files
committed
Add rspec tests for strict_variables
1 parent 219a783 commit 33c4260

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

spec/classes/puppet_master_spec.rb

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
:certname => 'test.example.com',
2525
:storeconfigs => 'true',
2626
:storeconfigs_dbserver => 'test.example.com',
27-
:dns_alt_names => ['puppet']
27+
:dns_alt_names => ['puppet'],
28+
:strict_variables => 'true'
2829

2930
}
3031
end
@@ -156,6 +157,13 @@
156157
:path => '/etc/puppet/puppet.conf',
157158
:value => params[:dns_alt_names].join(',')
158159
)
160+
should contain_ini_setting('puppetmasterstrictvariables').with(
161+
:ensure => 'present',
162+
:section => 'master',
163+
:setting => 'strict_variables',
164+
:path => '/etc/puppet/puppet.conf',
165+
:value => params[:strict_variables]
166+
)
159167
should contain_anchor('puppet::master::begin').with_before(
160168
['Class[Puppet::Passenger]', 'Class[Puppet::Storeconfigs]']
161169
)
@@ -185,7 +193,8 @@
185193
:certname => 'test.example.com',
186194
:storeconfigs => 'true',
187195
:storeconfigs_dbserver => 'test.example.com',
188-
:dns_alt_names => ['puppet']
196+
:dns_alt_names => ['puppet'],
197+
:strict_variables => 'true'
189198

190199
}
191200
end
@@ -315,6 +324,13 @@
315324
:path => '/etc/puppet/puppet.conf',
316325
:value => params[:dns_alt_names].join(',')
317326
)
327+
should contain_ini_setting('puppetmasterstrictvariables').with(
328+
:ensure => 'present',
329+
:section => 'master',
330+
:setting => 'strict_variables',
331+
:path => '/etc/puppet/puppet.conf',
332+
:value => params[:strict_variables]
333+
)
318334
should contain_anchor('puppet::master::begin').with_before(
319335
['Class[Puppet::Passenger]', 'Class[Puppet::Storeconfigs]']
320336
)

0 commit comments

Comments
 (0)