File: heat_clients_barbican_spec.rb

package info (click to toggle)
puppet-module-heat 25.0.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,560 kB
  • sloc: ruby: 3,889; python: 38; sh: 10; makefile: 10
file content (51 lines) | stat: -rw-r--r-- 1,461 bytes parent folder | download | duplicates (2)
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
46
47
48
49
50
51
require 'spec_helper'

describe 'heat::clients::barbican' do
  shared_examples 'heat::clients::barbican' do
    context 'with defaults' do
      it 'configures defaults' do
        is_expected.to contain_heat__clients__base('clients_barbican').with(
          :endpoint_type => '<SERVICE DEFAULT>',
          :ca_file       => '<SERVICE DEFAULT>',
          :cert_file     => '<SERVICE DEFAULT>',
          :key_file      => '<SERVICE DEFAULT>',
          :insecure      => '<SERVICE DEFAULT>',
        )
      end
    end

    context 'with parameters' do
      let :params do
        {
          :endpoint_type => 'publicURL',
          :ca_file       => '/path/to/ca.cert',
          :cert_file     => '/path/to/certfile',
          :key_file      => '/path/to/key',
          :insecure      => false,
        }
      end

      it 'configures client parameters' do
        is_expected.to contain_heat__clients__base('clients_barbican').with(
          :endpoint_type => 'publicURL',
          :ca_file       => '/path/to/ca.cert',
          :cert_file     => '/path/to/certfile',
          :key_file      => '/path/to/key',
          :insecure      => false,
        )
      end
    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 'heat::clients::barbican'
    end
  end
end