This file is indexed.

/usr/share/puppet/modules.available/oslo/spec/defines/oslo_messaging_zmq_spec.rb is in puppet-module-oslo 9.4.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
require 'spec_helper'

describe 'oslo::messaging::zmq' do

  let (:title) { 'keystone_config' }

  shared_examples 'oslo-messaging-zmq' do

    context 'with default parameters' do
      it 'configure zmq default params' do
       is_expected.to contain_keystone_config('DEFAULT/rpc_cast_timeout').with_value('<SERVICE DEFAULT>')
       is_expected.to contain_keystone_config('DEFAULT/rpc_poll_timeout').with_value('<SERVICE DEFAULT>')
       is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_bind_address').with_value('<SERVICE DEFAULT>')
       is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_bind_port_retries').with_value('<SERVICE DEFAULT>')
       is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_concurrency').with_value('<SERVICE DEFAULT>')
       is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_contexts').with_value('<SERVICE DEFAULT>')
       is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_host').with_value('<SERVICE DEFAULT>')
       is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_ipc_dir').with_value('<SERVICE DEFAULT>')
       is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_matchmaker').with_value('<SERVICE DEFAULT>')
       is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_max_port').with_value('<SERVICE DEFAULT>')
       is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_min_port').with_value('<SERVICE DEFAULT>')
       is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_topic_backlog').with_value('<SERVICE DEFAULT>')
       is_expected.to contain_keystone_config('DEFAULT/use_pub_sub').with_value('<SERVICE DEFAULT>')
       is_expected.to contain_keystone_config('DEFAULT/zmq_target_expire').with_value('<SERVICE DEFAULT>')
      end

    end

    context 'with overridden parameters' do
      let :params do
          { :rpc_zmq_bind_address => '0.0.0.0',
            :rpc_zmq_bind_port_retries => '10',
            :rpc_zmq_concurrency => 'native',
            :rpc_zmq_contexts => '2',
          }
      end

      it 'configure zmq with overriden values' do
       is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_bind_address').with_value('0.0.0.0')
       is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_bind_port_retries').with_value('10')
       is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_concurrency').with_value('native')
       is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_contexts').with_value('2')
      end
    end

    context 'with wrong zmq concurrency' do
      let :params do
        { :rpc_zmq_concurrency => 'some_another' }
      end

      it_raises 'a Puppet::Error', /Unsupported type of zmq concurrency is used/
    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 'oslo-messaging-zmq'
    end
  end
end