Change db-sync command for gnocchi and drop mock
Note: the 3 changes need to be in the same commit because CI is broken at
this time.
Change #1
In Mitaka gnocchi-dbsync was moved to gnocchi-upgrade [1,2].
[1] aee5df615e
[2] https://review.openstack.org/#/c/245069/5/setup.cfg
Partial-bug: #1535382
Change #2
drop mock dependency
mock is not used anywhere in the module, let's drop it.
This patch will help to hit this bug:
https://launchpad.net/bugs/1492636
Related-Bug: #1492636
Depends-On: I3ac207f744847b5742fc331d2c16d1dad475f9ea
Change-Id: I1e88361018fbbff42cae7e57f2e039fa45eaaeb1
This commit is contained in:
parent
60830a46c9
commit
e34e7ef628
1
Gemfile
1
Gemfile
|
@ -14,7 +14,6 @@ group :development, :test do
|
|||
gem 'puppet-lint-variable_contains_upcase', :require => 'false'
|
||||
gem 'puppet-lint-numericvariable', :require => 'false'
|
||||
gem 'json', :require => 'false'
|
||||
gem 'webmock', :require => 'false'
|
||||
gem 'puppet-openstack_spec_helper',
|
||||
:git => 'https://git.openstack.org/openstack/puppet-openstack_spec_helper',
|
||||
:require => false
|
||||
|
|
|
@ -8,8 +8,9 @@
|
|||
class gnocchi::db::sync (
|
||||
$user = 'gnocchi',
|
||||
){
|
||||
|
||||
exec { 'gnocchi-db-sync':
|
||||
command => 'gnocchi-dbsync --config-file /etc/gnocchi/gnocchi.conf',
|
||||
command => 'gnocchi-upgrade --config-file /etc/gnocchi/gnocchi.conf',
|
||||
path => '/usr/bin',
|
||||
refreshonly => true,
|
||||
user => $user,
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'gnocchi::db::sync' do
|
||||
|
||||
shared_examples_for 'gnocchi-dbsync' do
|
||||
|
||||
it 'runs gnocchi-manage db_sync' do
|
||||
is_expected.to contain_exec('gnocchi-db-sync').with(
|
||||
:command => 'gnocchi-upgrade --config-file /etc/gnocchi/gnocchi.conf',
|
||||
:path => '/usr/bin',
|
||||
:user => 'gnocchi',
|
||||
:refreshonly => 'true',
|
||||
:logoutput => 'on_failure'
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
context 'on a RedHat osfamily' do
|
||||
let :facts do
|
||||
{
|
||||
:osfamily => 'RedHat',
|
||||
:operatingsystemrelease => '7.0',
|
||||
}
|
||||
end
|
||||
|
||||
it_configures 'gnocchi-dbsync'
|
||||
end
|
||||
|
||||
context 'on a Debian osfamily' do
|
||||
let :facts do
|
||||
{
|
||||
:operatingsystemrelease => '7.8',
|
||||
:operatingsystem => 'Debian',
|
||||
:osfamily => 'Debian',
|
||||
}
|
||||
end
|
||||
|
||||
it_configures 'gnocchi-dbsync'
|
||||
end
|
||||
|
||||
end
|
|
@ -1,6 +1,5 @@
|
|||
require 'puppetlabs_spec_helper/module_spec_helper'
|
||||
require 'shared_examples'
|
||||
require 'webmock/rspec'
|
||||
|
||||
require 'puppet-openstack_spec_helper/defaults'
|
||||
require 'rspec-puppet-facts'
|
||||
|
|
Loading…
Reference in New Issue