nova_cell_v2_map_cell0_spec.rb 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. require 'spec_helper'
  2. describe 'nova::cell_v2::map_cell0' do
  3. shared_examples_for 'nova::cell_v2::map_cell0' do
  4. context 'with defaults' do
  5. it {
  6. is_expected.to contain_exec('nova-cell_v2-map_cell0').with(
  7. :path => ['/bin', '/usr/bin'],
  8. :command => 'nova-manage cell_v2 map_cell0',
  9. :refreshonly => 'true',
  10. :logoutput => 'on_failure',
  11. :subscribe => 'Anchor[nova::cell_v2::begin]',
  12. :notify => 'Anchor[nova::cell_v2::end]',
  13. )
  14. }
  15. end
  16. context "overriding extra_params" do
  17. let :params do
  18. {
  19. :extra_params => '--config-file /etc/nova/nova.conf',
  20. }
  21. end
  22. it {
  23. is_expected.to contain_exec('nova-cell_v2-map_cell0').with(
  24. :path => ['/bin', '/usr/bin'],
  25. :command => 'nova-manage --config-file /etc/nova/nova.conf cell_v2 map_cell0',
  26. :refreshonly => 'true',
  27. :logoutput => 'on_failure',
  28. :subscribe => 'Anchor[nova::cell_v2::begin]',
  29. :notify => 'Anchor[nova::cell_v2::end]',
  30. )
  31. }
  32. end
  33. end
  34. on_supported_os({
  35. :supported_os => OSDefaults.get_supported_os
  36. }).each do |os,facts|
  37. context "on #{os}" do
  38. let (:facts) do
  39. facts.merge(OSDefaults.get_facts())
  40. end
  41. it_configures 'nova::cell_v2::map_cell0'
  42. end
  43. end
  44. end