Merge "aodh-evaluator: Require redis backend"

This commit is contained in:
Zuul 2023-01-11 15:07:01 +00:00 committed by Gerrit Code Review
commit 79a67be5cf
2 changed files with 15 additions and 6 deletions

View File

@ -24,11 +24,11 @@
#
# [*aodh_redis_password*]
# (Optional) redis password to configure coordination url
# Defaults to lookup('aodh_redis_password', undef, undef, undef)
# Defaults to lookup('aodh_redis_password')
#
# [*redis_vip*]
# (Optional) redis vip to configure coordination url
# Defaults to lookup('redis_vip', undef, undef, undef)
# Defaults to lookup('redis_vip')
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
@ -37,8 +37,8 @@
#
class tripleo::profile::base::aodh::evaluator (
$enable_internal_tls = lookup('enable_internal_tls', undef, undef, false),
$aodh_redis_password = lookup('aodh_redis_password', undef, undef, undef),
$redis_vip = lookup('redis_vip', undef, undef, undef),
$aodh_redis_password = lookup('aodh_redis_password'),
$redis_vip = lookup('redis_vip'),
$step = Integer(lookup('step')),
) {

View File

@ -19,11 +19,20 @@ require 'spec_helper'
describe 'tripleo::profile::base::aodh::evaluator' do
shared_examples_for 'tripleo::profile::base::aodh::evaluator' do
let(:pre_condition) do
"class { 'tripleo::profile::base::aodh': step => #{params[:step]}, oslomsg_rpc_hosts => ['localhost.localdomain'] }"
<<-eos
class { 'tripleo::profile::base::aodh':
step => #{params[:step]},
oslomsg_rpc_hosts => ['localhost.localdomain']
}
eos
end
context 'with step less than 4' do
let(:params) { { :step => 3 } }
let(:params) { {
:step => 3,
:aodh_redis_password => 'password',
:redis_vip => '127.0.0.1',
} }
it 'should do nothing' do
is_expected.to contain_class('tripleo::profile::base::aodh::evaluator')