
Neutron changed the CLI to run db upgrades with heads, not head anymore. This change was long time ago, and we didn't catch it: https://review.openstack.org/#/c/194198/ Change-Id: I5946d3d965e6d5f5d0a1d7e5d6f3233453a9baa7
51 lines
1.2 KiB
Ruby
51 lines
1.2 KiB
Ruby
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 heads',
|
|
:path => '/usr/bin',
|
|
:refreshonly => 'true',
|
|
:logoutput => 'on_failure'
|
|
)
|
|
end
|
|
|
|
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 heads',
|
|
:path => '/usr/bin',
|
|
:refreshonly => 'true',
|
|
:logoutput => 'on_failure'
|
|
)
|
|
}
|
|
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({
|
|
:processorcount => 8,
|
|
:concat_basedir => '/var/lib/puppet/concat'
|
|
}))
|
|
end
|
|
|
|
it_configures 'neutron-dbsync'
|
|
end
|
|
end
|
|
|
|
end
|