module-puppetdb/spec/unit/classes/master/puppetdb_conf_spec.rb
Andrew Roetker 8eb9f67669 (PDB-1657) Manage Postgres repos by default
This commit moves to managing the Postgres repos by default. The
reason for this is so that the `puppetdb` class will "just work" by
default on most systems, because PostgreSQL 9.4 is not installed on 6/7
of the distros we support we need to manage the repos so we can install
the latest version.
2015-06-24 16:01:42 -07:00

32 lines
1,000 B
Ruby

require 'spec_helper'
describe 'puppetdb::master::puppetdb_conf', :type => :class do
let(:facts) do
{
:fqdn => 'puppetdb.example.com',
:osfamily => 'Debian',
:operatingsystem => 'Debian',
:operatingsystemrelease => '6.0',
:lsbdistid => 'Debian',
:lsbdistcodename => 'foo',
:kernel => 'Linux',
:concat_basedir => '/var/lib/puppet/concat',
:id => 'root',
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
}
end
let(:pre_condition) { 'class { "puppetdb": }' }
context 'when using using default values' do
it { should contain_ini_setting('puppetdbserver_urls').with( :value => 'https://localhost:8081/' )}
end
context 'when using using default values' do
let (:params) do { :legacy_terminus => true, } end
it { should contain_ini_setting('puppetdbserver').with( :value => 'localhost' )}
it { should contain_ini_setting('puppetdbport').with( :value => '8081' )}
end
end