2015-06-29 15:46:13 +02:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'neutron::db::sync' do
|
|
|
|
|
|
|
|
shared_examples_for 'neutron-dbsync' do
|
|
|
|
|
|
|
|
it 'runs neutron-db-sync' do
|
|
|
|
is_expected.to contain_exec('neutron-db-sync').with(
|
|
|
|
:command => 'neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade head',
|
|
|
|
:path => '/usr/bin',
|
|
|
|
:refreshonly => 'true',
|
|
|
|
:logoutput => 'on_failure'
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
2015-11-02 22:34:06 +00:00
|
|
|
describe "overriding extra_params" do
|
|
|
|
let :params do
|
|
|
|
{
|
|
|
|
:extra_params => '--config-file /etc/neutron/neutron.conf',
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
it {
|
|
|
|
is_expected.to contain_exec('neutron-db-sync').with(
|
|
|
|
:command => 'neutron-db-manage --config-file /etc/neutron/neutron.conf upgrade head',
|
|
|
|
:path => '/usr/bin',
|
|
|
|
:refreshonly => 'true',
|
|
|
|
:logoutput => 'on_failure'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2015-06-29 15:46:13 +02:00
|
|
|
end
|
|
|
|
|
2016-04-30 11:45:04 +08:00
|
|
|
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({
|
|
|
|
:processorcount => 8,
|
|
|
|
:concat_basedir => '/var/lib/puppet/concat'
|
|
|
|
}))
|
|
|
|
end
|
|
|
|
|
|
|
|
it_configures 'neutron-dbsync'
|
2015-06-29 15:46:13 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|