service validation: log output on failures

When validating a service, it's useful to have logs when exec output
fails.
This patch adds this feature.

Change-Id: I43c9eff8516ea562bf9bde8d5651ddceeb496163
This commit is contained in:
Emilien Macchi 2016-07-14 12:49:11 -04:00
parent d15ec4ffc7
commit f37a0a339a
2 changed files with 2 additions and 0 deletions

View File

@ -76,6 +76,7 @@ define openstacklib::service_validation(
try_sleep => $try_sleep,
onlyif => $onlyif,
unless => $unless,
logoutput => 'on_failure',
}
anchor { "create ${service_name} anchor":

View File

@ -38,6 +38,7 @@ describe 'openstacklib::service_validation' do
:command => 'nova list',
:tries => '10',
:try_sleep => '2',
:logoutput => 'on_failure',
)}
it { is_expected.to contain_anchor("create #{title} anchor").with(