aboutsummaryrefslogtreecommitdiffstats
path: root/spec/classes/tripleo_profile_base_ceilometer_api_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/classes/tripleo_profile_base_ceilometer_api_spec.rb')
-rw-r--r--spec/classes/tripleo_profile_base_ceilometer_api_spec.rb18
1 files changed, 15 insertions, 3 deletions
diff --git a/spec/classes/tripleo_profile_base_ceilometer_api_spec.rb b/spec/classes/tripleo_profile_base_ceilometer_api_spec.rb
index 256b756..2887d32 100644
--- a/spec/classes/tripleo_profile_base_ceilometer_api_spec.rb
+++ b/spec/classes/tripleo_profile_base_ceilometer_api_spec.rb
@@ -19,7 +19,7 @@ require 'spec_helper'
describe 'tripleo::profile::base::ceilometer::api' do
shared_examples_for 'tripleo::profile::base::ceilometer::api' do
let(:pre_condition) do
- "class { '::tripleo::profile::base::ceilometer': step => #{params[:step]}, rabbit_hosts => ['127.0.0.1'] }"
+ "class { '::tripleo::profile::base::ceilometer': step => #{params[:step]}, rabbit_hosts => ['localhost.localdomain'] }"
end
context 'with step less than 4' do
@@ -32,9 +32,10 @@ describe 'tripleo::profile::base::ceilometer::api' do
end
end
- context 'with step 4' do
+ context 'with step 4 and enable_legacy_api' do
let(:params) { {
- :step => 4,
+ :step => 4,
+ :enable_legacy_api => true,
} }
it 'should trigger complete configuration' do
@@ -42,6 +43,17 @@ describe 'tripleo::profile::base::ceilometer::api' do
is_expected.to contain_class('ceilometer::wsgi::apache')
end
end
+
+ context 'with step 4 and default enable_legacy_api' do
+ let(:params) { {
+ :step => 4,
+ } }
+
+ it 'should do nothing' do
+ is_expected.to_not contain_class('ceilometer::api')
+ is_expected.to_not contain_class('ceilometer::wsgi::apache')
+ end
+ end
end