aboutsummaryrefslogtreecommitdiffstats
path: root/spec/classes
diff options
context:
space:
mode:
authorAlex Schultz <aschultz@redhat.com>2016-09-30 09:55:24 -0600
committerAlex Schultz <aschultz@redhat.com>2016-10-07 15:17:04 +0000
commit8e70fc19eca7149dff793751fc7a7f5fd2ad74f5 (patch)
treedc755c2c71d55167cf079f6b0daed44718719496 /spec/classes
parent41dac693cfcdf2ece25d3257b0d82110a1cb3162 (diff)
Only run ceilometer::db::sync on bootstrap node
The ceilometer::db::sync is included by default in ceilometer::db but we only want it to run on the bootstrap node. This change passes the sync_db parameter to ceilometer::db to manage the db sync process rather than trying to manage the inclusion of ceilometer::db::sync within the profile class. Change-Id: Ib56db1a90dd6fbfe7582fc57b7728df81942cce2 Closes-Bug: #1629373
Diffstat (limited to 'spec/classes')
-rw-r--r--spec/classes/tripleo_profile_base_ceilometer_collector_spec.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/classes/tripleo_profile_base_ceilometer_collector_spec.rb b/spec/classes/tripleo_profile_base_ceilometer_collector_spec.rb
index e262491..718c700 100644
--- a/spec/classes/tripleo_profile_base_ceilometer_collector_spec.rb
+++ b/spec/classes/tripleo_profile_base_ceilometer_collector_spec.rb
@@ -52,6 +52,7 @@ describe 'tripleo::profile::base::ceilometer::collector' do
is_expected.to contain_class('tripleo::profile::base::ceilometer::collector')
is_expected.to contain_class('ceilometer::db::sync')
is_expected.to contain_class('ceilometer::db').with(
+ :sync_db => true,
:database_connection => 'mongodb://[::1]:27017,[fe80::ca5b:76ff:fe4b:be3b]:27017/ceilometer?replicaSet=replicaset'
)
end
@@ -72,6 +73,9 @@ describe 'tripleo::profile::base::ceilometer::collector' do
is_expected.to contain_class('ceilometer::db').without(
:database_connection => 'mongodb://127.0.0.1:27017/ceilometer?replicaSet=replicaset'
)
+ is_expected.to contain_class('ceilometer::db').with(
+ :sync_db => true
+ )
end
end
@@ -98,6 +102,7 @@ describe 'tripleo::profile::base::ceilometer::collector' do
it 'should trigger complete configuration' do
is_expected.to contain_class('ceilometer::db::sync')
is_expected.to contain_class('ceilometer::db').with(
+ :sync_db => true,
:database_connection => 'mongodb://127.0.0.1:27017/ceilometer?replicaSet=replicaset'
)
is_expected.to contain_class('ceilometer::collector')
@@ -114,9 +119,9 @@ describe 'tripleo::profile::base::ceilometer::collector' do
} }
it 'should trigger complete configuration' do
- #TODO(aschultz): LP#1629373
- #is_expected.to_not contain_class('ceilometer::db::sync')
+ is_expected.to_not contain_class('ceilometer::db::sync')
is_expected.to contain_class('ceilometer::db').with(
+ :sync_db => false,
:database_connection => 'mongodb://127.0.0.1:27017/ceilometer?replicaSet=replicaset'
)
is_expected.to contain_class('ceilometer::collector')