aboutsummaryrefslogtreecommitdiffstats
path: root/puppet-barometer/spec/classes/barometer_policy_spec.rb
blob: 27259f394f464bb29bbea3a2db57c400079a1b26 (plain)
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
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weigh
require 'spec_helper'

describe 'barometer::policy' do
  shared_examples_for 'barometer-policies' do
    let :params do
      {
        :policy_path => '/etc/barometer/policy.json',
        :policies    => {
          'context_is_admin' => {
            'key'   => 'context_is_admin',
            'value' => 'foo:bar'
          }
        }
      }
    end

    it 'set up the policies' do
      is_expected.to contain_openstacklib__policy__base('context_is_admin').with({
        :key   => 'context_is_admin',
        :value => 'foo:bar'
      })
    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 'barometer-policies'
    end
  end
end
/span>^15)%2^5, proto = ((i-i%2^20)/2^20)%2^3 * 2^5, } end