This file is indexed.

/usr/share/puppet/modules.available/glance/spec/unit/provider/glance_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
require 'puppet'
require 'spec_helper'
require 'puppet/provider/glance'
require 'tempfile'


klass = Puppet::Provider::Glance

class Puppet::Provider::Glance
  def self.reset
    @admin_endpoint = nil
    @tenant_hash    = nil
    @admin_token    = nil
    @keystone_file  = nil
  end
end

describe Puppet::Provider::Glance do

  after :each do
    klass.reset
  end

  describe 'when retrieving the auth credentials' do

    it 'should fail if no auth params are passed and the glance config file does not have the expected contents' do
      mock = {}
      Puppet::Util::IniConfig::File.expects(:new).returns(mock)
      mock.expects(:read).with('/etc/glance/glance-api.conf')
      expect do
        klass.glance_credentials
      end.to raise_error(Puppet::Error, /does not contain all required sections/)
    end

  end

end