Project

General

Profile

« Previous | Next » 

Revision 310e8878

Added by Marek Hulán almost 11 years ago

Convert multitype parameters to strings

Some parameters could be set to false or a string value. We prefer
consistent type so all such parameters are now forced to be string. In
case you want to indicate that the parameter should not be used you can
set it to undef.

Some documentation was added.

Change lookup to instance variables.

Make $server_external_nodes a real string

View differences:

spec/classes/puppet_server_config_spec.rb
"class {'puppet':
server => true,
server_reports => 'store',
server_external_nodes => false,
server_external_nodes => '',
}"
end
......
should contain_file('/etc/puppet/puppet.conf').with_content(/^\s+reports\s+= store$/)
end
it 'should contain an empty external_nodes' do
should contain_file('/etc/puppet/puppet.conf').with_content(/^\s+external_nodes\s+=\s+$/)
end
end
describe 'without external_nodes' do
let :pre_condition do
"class {'puppet':
server => true,
server_external_nodes => '',
}"
end
it 'should not contain external_nodes' do
should_not contain_file('/etc/puppet/puppet.conf').with_content(/external_nodes/)
should contain_file('/etc/puppet/puppet.conf').
with_content(/^\s+external_nodes\s+= $/).
with_content(/^\s+node_terminus\s+= plain$/).
with({})
end
end
end

Also available in: Unified diff