This file is indexed.

/usr/share/puppet/modules.available/puppetlabs-mongodb/spec/unit/mongodb_password_spec.rb is in puppet-module-puppetlabs-mongodb 0.7.0-2.

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
require 'spec_helper'

describe 'the mongodb_password function' do
  before :all do
    Puppet::Parser::Functions.autoloader.loadall
  end

  let(:scope) { PuppetlabsSpec::PuppetInternals.scope }

  it 'should exist' do
    Puppet::Parser::Functions.function('mongodb_password').should == 'function_mongodb_password'
  end

  it 'should raise a ParseError if there no arguments' do
    lambda { scope.function_mongodb_password([]) }.should( raise_error(Puppet::ParseError))
  end

  it 'should raise a ParseError if there is more than 2 arguments' do
    lambda { scope.function_mongodb_password(%w(foo bar baz)) }.should( raise_error(Puppet::ParseError))
  end

  it 'should convert password into a hash' do
    result = scope.function_mongodb_password(%w(user pass))
    result.should(eq('e0c4a7b97d4db31f5014e9694e567d6b'))
  end

end