Merge branch 'feature/master/jetty_ini_tests' into feature/master/option_to_disable_ssl
This commit is contained in:
commit
a560214f8f
1 changed files with 49 additions and 0 deletions
49
spec/unit/classes/server/jetty_ini_spec.rb
Normal file
49
spec/unit/classes/server/jetty_ini_spec.rb
Normal file
|
@ -0,0 +1,49 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'puppetdb::server::jetty_ini', :type => :class do
|
||||
context 'on a supported platform' do
|
||||
let(:facts) do
|
||||
{
|
||||
:osfamily => 'RedHat',
|
||||
:clientcert => 'test.domain.local',
|
||||
}
|
||||
end
|
||||
|
||||
it { should include_class('puppetdb::server::jetty_ini') }
|
||||
|
||||
describe 'when using default values' do
|
||||
it { should contain_ini_setting('puppetdb_host').
|
||||
with(
|
||||
'ensure' => 'present',
|
||||
'path' => '/etc/puppetdb/conf.d/jetty.ini',
|
||||
'section' => 'jetty',
|
||||
'setting' => 'host',
|
||||
'value' => 'localhost',
|
||||
)}
|
||||
it { should contain_ini_setting('puppetdb_port').
|
||||
with(
|
||||
'ensure' => 'present',
|
||||
'path' => '/etc/puppetdb/conf.d/jetty.ini',
|
||||
'section' => 'jetty',
|
||||
'setting' => 'port',
|
||||
'value' => 8080,
|
||||
)}
|
||||
it { should contain_ini_setting('puppetdb_sslhost').
|
||||
with(
|
||||
'ensure' => 'present',
|
||||
'path' => '/etc/puppetdb/conf.d/jetty.ini',
|
||||
'section' => 'jetty',
|
||||
'setting' => 'ssl-host',
|
||||
'value' => 'test.domain.local',
|
||||
)}
|
||||
it { should contain_ini_setting('puppetdb_sslport').
|
||||
with(
|
||||
'ensure' => 'present',
|
||||
'path' => '/etc/puppetdb/conf.d/jetty.ini',
|
||||
'section' => 'jetty',
|
||||
'setting' => 'ssl-port',
|
||||
'value' => 8081,
|
||||
)}
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue