| 1 |
require 'spec_helper' |
| 2 |
|
| 3 |
describe 'cloudkitty::storage' do |
| 4 |
|
| 5 |
shared_examples_for 'cloudkitty-storage-init' do |
| 6 |
|
| 7 |
it 'runs cloudkitty-storage-init' do |
| 8 |
is_expected.to contain_exec('cloudkitty-storage-init').with( |
| 9 |
:command => 'cloudkitty-storage-init ', |
| 10 |
:path => '/usr/bin', |
| 11 |
:refreshonly => 'true', |
| 12 |
:user => 'cloudkitty', |
| 13 |
:logoutput => 'on_failure', |
| 14 |
:subscribe => ['Anchor[cloudkitty::install::end]', |
| 15 |
'Anchor[cloudkitty::config::end]', |
| 16 |
'Anchor[cloudkitty::dbsync::end]', |
| 17 |
'Anchor[cloudkitty::storageinit::begin]'], |
| 18 |
:notify => 'Anchor[cloudkitty::storageinit::end]', |
| 19 |
) |
| 20 |
end |
| 21 |
|
| 22 |
end |
| 23 |
|
| 24 |
on_supported_os({ |
| 25 |
:supported_os => OSDefaults.get_supported_os |
| 26 |
}).each do |os,facts| |
| 27 |
context "on #{os}" do |
| 28 |
let (:facts) do |
| 29 |
facts.merge(OSDefaults.get_facts()) |
| 30 |
end |
| 31 |
|
| 32 |
it_configures 'cloudkitty-storage-init' |
| 33 |
end |
| 34 |
end |
| 35 |
|
| 36 |
end |