fuel-library/deployment/puppet/openssl/spec/classes/openssl_spec.rb
Bartłomiej Piotrowski 85c7847648 Merge camptocamp/openssl upstream module
Commit: 3de5612b350f820e665d946e0ac52970f3abf93f
Source: https://github.com/camptocamp/puppet-openssl.git

Change-Id: Ie13b45c166d632db1c7172d9a85d91690a66934a
Related: blueprint merge-openstack-puppet-modules
2015-01-12 09:47:04 +01:00

37 lines
1.1 KiB
Ruby

require 'spec_helper'
describe 'openssl' do
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) { facts }
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_package('openssl').with_ensure('present') }
if facts[:osfamily] == 'Debian'
it { is_expected.to contain_package('ca-certificates') }
it { is_expected.to contain_exec('update-ca-certificates').with_refreshonly('true') }
it { is_expected.to contain_file('ca-certificates.crt').with(
:ensure => 'present',
:owner => 'root',
:mode => '0644',
:path => '/etc/ssl/certs/ca-certificates.crt'
)
}
elsif facts[:osfamily] == 'RedHat'
it { is_expected.not_to contain_package('ca-certificates') }
it { is_expected.not_to contain_exec('update-ca-certificates').with_refreshonly('true') }
it { is_expected.to contain_file('ca-certificates.crt').with(
:ensure => 'present',
:owner => 'root',
:mode => '0644',
:path => '/etc/pki/tls/certs/ca-bundle.crt'
)
}
end
end
end
end