Project

General

Profile

« Previous | Next » 

Revision 66b258c8

Added by Ewoud Kohl van Wijngaarden about 7 years ago

Convert to Puppet 4 types

View differences:

spec/classes/pulp_admin_spec.rb
it { should contain_package('pulp-admin-client').with_ensure('installed') }
it 'should set admin.conf file' do
should contain_file('/etc/pulp/admin/admin.conf').
with_content(/^\[server\]$/).
with_content(/^host: foo.example.com$/).
with_content(/^port: 443$/).
with_content(/^api_prefix: \/pulp\/api$/).
with_content(/^verify_ssl: true$/).
with_content(/^ca_path: \/etc\/pki\/tls\/certs\/ca-bundle.crt$/).
with_content(/^upload_chunk_size: 1048576$/).
with_content(/^\[client\]$/).
with_content(/^role: admin$/).
with_content(/^\[filesystem\]$/).
with_content(/^extensions_dir: \/usr\/lib\/pulp\/admin\/extensions$/).
with_content(/^id_cert_dir: ~\/.pulp$/).
with_content(/^id_cert_filename: user-cert.pem$/).
with_content(/^upload_working_dir: ~\/.pulp\/uploads$/).
with_content(/^\[logging\]$/).
with_content(/^filename: ~\/.pulp\/admin.log$/).
with_content(/^call_log_filename: ~\/.pulp\/server_calls.log$/).
with_content(/^\[output\]$/).
with_content(/^poll_frequency_in_seconds: 1$/).
with_content(/^enable_color: true$/).
with_content(/^wrap_to_terminal: false$/).
with_content(/^wrap_width: 80$/).
with_ensure('file')
verify_exact_contents(catalogue, '/etc/pulp/admin/admin.conf', [
'[server]',
'host: foo.example.com',
'port: 443',
'api_prefix: /pulp/api',
'verify_ssl: true',
'ca_path: /etc/pki/tls/certs/ca-bundle.crt',
'upload_chunk_size: 1048576',
'[client]',
'role: admin',
'[filesystem]',
'extensions_dir: /usr/lib/pulp/admin/extensions',
'id_cert_dir: ~/.pulp',
'id_cert_filename: user-cert.pem',
'upload_working_dir: ~/.pulp/uploads',
'[logging]',
'filename: ~/.pulp/admin.log',
'call_log_filename: ~/.pulp/server_calls.log',
'[output]',
'poll_frequency_in_seconds: 1',
'enable_color: true',
'wrap_to_terminal: false',
'wrap_width: 80',
])
end
end
......
it { should contain_package('pulp-puppet-admin-extensions').with_ensure('installed') }
it 'should set puppet.conf file' do
should contain_file('/etc/pulp/admin/conf.d/puppet.conf').
with_content(/^\[puppet\]$/).
with_content(/^upload_working_dir = ~\/.pulp\/puppet-uploads$/).
with_content(/^upload_chunk_size = 1048576$/).
with_ensure('file')
verify_exact_contents(catalogue, '/etc/pulp/admin/conf.d/puppet.conf', [
'[puppet]',
'upload_working_dir = ~/.pulp/puppet-uploads',
'upload_chunk_size = 1048576',
])
end
end
......
context 'install with params' do
let(:params) do {
'host' => 'pulp.company.net',
'verify_ssl' => false,
} end
'host' => 'pulp.company.net',
'verify_ssl' => false,
} end
it 'should set the defaults file' do
should contain_file('/etc/pulp/admin/admin.conf').

Also available in: Unified diff