This file is indexed.

/usr/share/puppet/modules.available/glance/spec/classes/glance_backend_rbd_spec.rb is in puppet-module-glance 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
require 'spec_helper'

describe 'glance::backend::rbd' do
  let :facts do
      @default_facts.merge({
        :osfamily       => 'Debian',
      })
  end

  describe 'with default params' do

    it { is_expected.to contain_glance_api_config('glance_store/default_store').with_value('rbd') }
    it { is_expected.to contain_glance_api_config('glance_store/rbd_store_pool').with_value('<SERVICE DEFAULT>') }
    it { is_expected.to contain_glance_api_config('glance_store/rbd_store_ceph_conf').with_value('<SERVICE DEFAULT>') }
    it { is_expected.to contain_glance_api_config('glance_store/rbd_store_chunk_size').with_value('<SERVICE DEFAULT>') }
    it { is_expected.to contain_glance_api_config('glance_store/rados_connect_timeout').with_value('<SERVICE DEFAULT>')}
    it { is_expected.to contain_glance_api_config('glance_store/rbd_store_user').with_value('<SERVICE DEFAULT>')}

    it { is_expected.to_not contain_glance_glare_config('glance_store/default_store').with_value('rbd') }
    it { is_expected.to_not contain_glance_glare_config('glance_store/rbd_store_pool').with_value('<SERVICE DEFAULT>') }
    it { is_expected.to_not contain_glance_glare_config('glance_store/rbd_store_ceph_conf').with_value('<SERVICE DEFAULT>') }
    it { is_expected.to_not contain_glance_glare_config('glance_store/rbd_store_chunk_size').with_value('<SERVICE DEFAULT>') }
    it { is_expected.to_not contain_glance_glare_config('glance_store/rados_connect_timeout').with_value('<SERVICE DEFAULT>')}
    it { is_expected.to_not contain_glance_glare_config('glance_store/rbd_store_user').with_value('<SERVICE DEFAULT>')}
    it { is_expected.to contain_package('python-ceph').with(
        :name   => 'python-ceph',
        :ensure => 'present'
      )
    }
  end

  describe 'when passing params' do
    let :params do
      {
        :rbd_store_user        => 'user',
        :rbd_store_chunk_size  => '2',
        :package_ensure        => 'latest',
        :rados_connect_timeout => '30',
        :glare_enabled         => true,
      }
    end
    it { is_expected.to contain_glance_api_config('glance_store/rbd_store_user').with_value('user') }
    it { is_expected.to contain_glance_api_config('glance_store/rbd_store_chunk_size').with_value('2') }
    it { is_expected.to contain_glance_api_config('glance_store/rados_connect_timeout').with_value('30')}
    it { is_expected.to contain_glance_glare_config('glance_store/rbd_store_user').with_value('user') }
    it { is_expected.to contain_glance_glare_config('glance_store/rbd_store_chunk_size').with_value('2') }
    it { is_expected.to contain_glance_glare_config('glance_store/rados_connect_timeout').with_value('30')}
    it { is_expected.to contain_package('python-ceph').with(
        :name   => 'python-ceph',
        :ensure => 'latest'
      )
    }
  end

  describe 'package on RedHat platform el6' do
    let :facts do
      @default_facts.merge({
        :osfamily               => 'RedHat',
        :operatingsystemrelease => '6.5',
      })
    end
    it { is_expected.to contain_package('python-ceph').with(
        :name   => 'python-ceph',
        :ensure => 'present'
      )
    }
  end
  describe 'package on RedHat platform el7' do
    let :facts do
      @default_facts.merge({
        :osfamily               => 'RedHat',
        :operatingsystemrelease => '7.0'
      })
    end
    it { is_expected.to contain_package('python-ceph').with(
        :name   => 'python-rbd',
        :ensure => 'present'
      )
    }
  end
end