This file is indexed.

/usr/lib/ruby/vendor_ruby/fog/test_helpers/compute/server_helper.rb is in ruby-fog-core 1.45.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
def server_tests(connection, params = {}, mocks_implemented = true)
  model_tests(connection.servers, params, mocks_implemented) do
    tests("#reload").returns(true) do
      pending if Fog.mocking? && !mocks_implemented
      @instance.wait_for { ready? }
      identity = @instance.identity
      !identity.nil? && identity == @instance.reload.identity
    end

    responds_to([:ready?, :state])
    yield if block_given?

    tests("#reboot").succeeds do
      pending if Fog.mocking? && !mocks_implemented
      @instance.wait_for { ready? }
      @instance.reboot
    end

    @instance.wait_for { ready? } if !Fog.mocking? || mocks_implemented
  end
end