3 describe 'postgresql::lib::devel', :type => :class do
7 :operatingsystem => 'Debian',
8 :operatingsystemrelease => '6.0',
11 it { is_expected.to contain_class("postgresql::lib::devel") }
13 describe 'link pg_config to /usr/bin' do
14 it { should_not contain_file('/usr/bin/pg_config') \
15 .with_ensure('link') \
16 .with_target('/usr/lib/postgresql/8.4/bin/pg_config')
20 describe 'disable link_pg_config' do
22 :link_pg_config => false,
24 it { should_not contain_file('/usr/bin/pg_config') }
27 describe 'should not link pg_config on RedHat with default version' do
29 :osfamily => 'RedHat',
30 :operatingsystem => 'CentOS',
31 :operatingsystemrelease => '6.3',
32 :operatingsystemmajrelease => '6',
34 it { should_not contain_file('/usr/bin/pg_config') }
37 describe 'link pg_config on RedHat with non-default version' do
39 :osfamily => 'RedHat',
40 :operatingsystem => 'CentOS',
41 :operatingsystemrelease => '6.3',
42 :operatingsystemmajrelease => '6',
45 "class { '::postgresql::globals': version => '9.3' }"
48 it { should contain_file('/usr/bin/pg_config') \
49 .with_ensure('link') \
50 .with_target('/usr/pgsql-9.3/bin/pg_config')
54 describe 'on Gentoo' do
57 :osfamily => 'Gentoo',
58 :operatingsystem => 'Gentoo',
63 :link_pg_config => false,
67 it 'should fail to compile' do
69 is_expected.to compile
70 }.to raise_error(/is not supported/)