c7b3b489e6
Increase the setting log level in the synchronization database. Change-Id: Idfbcec022b629f66df9a52c84700f5b67a70cbcf Closes-Bug: #1683567
65 lines
1.9 KiB
Ruby
65 lines
1.9 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'barbican::db::sync' do
|
|
|
|
shared_examples_for 'barbican-dbsync' do
|
|
|
|
it 'runs barbican-manage db upgrade' do
|
|
is_expected.to contain_exec('barbican-db-manage').with(
|
|
:command => 'barbican-manage db upgrade ',
|
|
:user => 'barbican',
|
|
:path => ['/bin','/usr/bin'],
|
|
:refreshonly => 'true',
|
|
:try_sleep => 5,
|
|
:tries => 10,
|
|
:logoutput => 'on_failure',
|
|
:subscribe => ['Anchor[barbican::install::end]',
|
|
'Anchor[barbican::config::end]',
|
|
'Anchor[barbican::dbsync::begin]'],
|
|
:notify => 'Anchor[barbican::dbsync::end]',
|
|
)
|
|
end
|
|
|
|
describe "overriding extra_params" do
|
|
let :params do
|
|
{
|
|
:extra_params => '--config-file /etc/barbican/barbican.conf',
|
|
}
|
|
end
|
|
|
|
it {
|
|
is_expected.to contain_exec('barbican-db-manage').with(
|
|
:command => 'barbican-manage db upgrade --config-file /etc/barbican/barbican.conf',
|
|
:user => 'barbican',
|
|
:path => ['/bin','/usr/bin'],
|
|
:refreshonly => 'true',
|
|
:try_sleep => 5,
|
|
:tries => 10,
|
|
:logoutput => 'on_failure',
|
|
:subscribe => ['Anchor[barbican::install::end]',
|
|
'Anchor[barbican::config::end]',
|
|
'Anchor[barbican::dbsync::begin]'],
|
|
:notify => 'Anchor[barbican::dbsync::end]',
|
|
)
|
|
}
|
|
end
|
|
|
|
end
|
|
|
|
on_supported_os({
|
|
:supported_os => OSDefaults.get_supported_os
|
|
}).each do |os,facts|
|
|
context "on #{os}" do
|
|
let (:facts) do
|
|
facts.merge(OSDefaults.get_facts({
|
|
:os_workers => 8,
|
|
:concat_basedir => '/var/lib/puppet/concat'
|
|
}))
|
|
end
|
|
|
|
it_configures 'barbican-dbsync'
|
|
end
|
|
end
|
|
|
|
end
|