File: manila_coordination_spec.rb

package info (click to toggle)
puppet-module-manila 27.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,852 kB
  • sloc: ruby: 5,060; python: 33; makefile: 10; sh: 10
file content (45 lines) | stat: -rw-r--r-- 1,192 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
require 'spec_helper'

describe 'manila::coordination' do
  shared_examples 'manila::coordination' do
    context 'with default parameters' do
      it {
        is_expected.to contain_oslo__coordination('manila_config').with(
          :backend_url            => '<SERVICE DEFAULT>',
          :manage_backend_package => true,
          :package_ensure         => 'present',
        )
      }
    end

    context 'with specified parameters' do
      let :params do
        {
          :backend_url            => 'etcd3+http://127.0.0.1:2379',
          :manage_backend_package => false,
          :package_ensure         => 'latest',
        }
      end

      it {
        is_expected.to contain_oslo__coordination('manila_config').with(
          :backend_url            => 'etcd3+http://127.0.0.1:2379',
          :manage_backend_package => false,
          :package_ensure         => 'latest',
        )
      }
    end
  end

  on_supported_os({
    :supported_os => OSDefaults.get_supported_os
  }).each do |os,facts|
    context "on #{os}" do
      let (:facts) do
        facts.merge(OSDefaults.get_facts())
      end

      it_behaves_like 'manila::coordination'
    end
  end
end