Ensurability fix for modular/heat/heat.pp

Add config-cleanup part if sahara becomes disabled.

Change-Id: Idf58656a432ad74c223828f45141f876aaac3795
Related-Blueprint: #granular-task-ensurability
This commit is contained in:
Peter Zhurba 2016-02-26 11:49:39 +02:00
parent c776b59bdb
commit 9272bcfc2a
2 changed files with 9 additions and 3 deletions

View File

@ -129,7 +129,11 @@ if hiera('heat_ha_engine', true){
if $sahara_hash['enabled'] {
heat_config {
'DEFAULT/reauthentication_auth_method': value => 'trusts';
'DEFAULT/reauthentication_auth_method': value => 'trusts';
}
} else {
heat_config {
'DEFAULT/reauthentication_auth_method': ensure => absent;
}
}

View File

@ -89,9 +89,11 @@ describe manifest do
should contain_heat_config('DEFAULT/default_log_levels').with_value(default_log_levels.sort.join(','))
end
if sahara
it 'should configure ' do
it 'should configure reauthentication_auth_method' do
if sahara
should contain_heat_config('DEFAULT/reauthentication_auth_method').with_value('trusts')
else
should contain_heat_config('DEFAULT/reauthentication_auth_method').with_ensure('absent')
end
end