Fix spec test for sync

Change-Id: I8ffe7c003ebf04668162003dd99a93e5d08d08b2
This commit is contained in:
ZhongShengping
2016-12-01 17:33:00 +08:00
parent bfeff3257c
commit cf56e3f0f7
2 changed files with 24 additions and 4 deletions

View File

@@ -8,7 +8,11 @@ describe 'nova::db::sync_api' do
is_expected.to contain_exec('nova-db-sync-api').with( is_expected.to contain_exec('nova-db-sync-api').with(
:command => '/usr/bin/nova-manage api_db sync', :command => '/usr/bin/nova-manage api_db sync',
:refreshonly => 'true', :refreshonly => 'true',
:logoutput => 'on_failure' :logoutput => 'on_failure',
:subscribe => ['Anchor[nova::install::end]',
'Anchor[nova::config::end]',
'Anchor[nova::dbsync_api::begin]'],
:notify => 'Anchor[nova::dbsync_api::end]',
) )
end end
@@ -23,7 +27,11 @@ describe 'nova::db::sync_api' do
is_expected.to contain_exec('nova-db-sync-api').with( is_expected.to contain_exec('nova-db-sync-api').with(
:command => '/usr/bin/nova-manage --config-file /etc/nova/nova.conf api_db sync', :command => '/usr/bin/nova-manage --config-file /etc/nova/nova.conf api_db sync',
:refreshonly => 'true', :refreshonly => 'true',
:logoutput => 'on_failure' :logoutput => 'on_failure',
:subscribe => ['Anchor[nova::install::end]',
'Anchor[nova::config::end]',
'Anchor[nova::dbsync_api::begin]'],
:notify => 'Anchor[nova::dbsync_api::end]',
) )
} }
end end

View File

@@ -8,7 +8,13 @@ describe 'nova::db::sync' do
is_expected.to contain_exec('nova-db-sync').with( is_expected.to contain_exec('nova-db-sync').with(
:command => '/usr/bin/nova-manage db sync', :command => '/usr/bin/nova-manage db sync',
:refreshonly => 'true', :refreshonly => 'true',
:logoutput => 'on_failure' :try_sleep => 5,
:tries => 10,
:logoutput => 'on_failure',
:subscribe => ['Anchor[nova::install::end]',
'Anchor[nova::config::end]',
'Anchor[nova::dbsync::begin]'],
:notify => 'Anchor[nova::dbsync::end]',
) )
end end
@@ -23,7 +29,13 @@ describe 'nova::db::sync' do
is_expected.to contain_exec('nova-db-sync').with( is_expected.to contain_exec('nova-db-sync').with(
:command => '/usr/bin/nova-manage --config-file /etc/nova/nova.conf db sync', :command => '/usr/bin/nova-manage --config-file /etc/nova/nova.conf db sync',
:refreshonly => 'true', :refreshonly => 'true',
:logoutput => 'on_failure' :try_sleep => 5,
:tries => 10,
:logoutput => 'on_failure',
:subscribe => ['Anchor[nova::install::end]',
'Anchor[nova::config::end]',
'Anchor[nova::dbsync::begin]'],
:notify => 'Anchor[nova::dbsync::end]',
) )
} }
end end