Sha256: efb3ddd2e625341d57b71a2590bae7641d2868a8d5d98ced183b44551b302f9f

Contents?: true

Size: 582 Bytes

Versions: 120

Compression:

Stored size: 582 Bytes

Contents

class ConstantErrorValidator
  def initialize(args)
    @fails_with = args[:fails_with]
    @error_string = args[:error_string] || ""
    @peer_certs = args[:peer_certs] || []
  end

  def setup_connection(connection)
    connection.stubs(:start).raises(OpenSSL::SSL::SSLError.new(@fails_with))
  end

  def peer_certs
    @peer_certs
  end

  def verify_errors
    [@error_string]
  end
end

class NoProblemsValidator
  def initialize(cert)
    @cert = cert
  end

  def setup_connection(connection)
  end

  def peer_certs
    [@cert]
  end

  def verify_errors
    []
  end
end

Version data entries

120 entries across 120 versions & 1 rubygems

Version Path
puppet-6.4.5 spec/lib/puppet_spec/validators.rb
puppet-6.4.5-x86-mingw32 spec/lib/puppet_spec/validators.rb
puppet-6.4.5-x64-mingw32 spec/lib/puppet_spec/validators.rb
puppet-6.4.5-universal-darwin spec/lib/puppet_spec/validators.rb
puppet-6.11.1 spec/lib/puppet_spec/validators.rb
puppet-6.11.1-x86-mingw32 spec/lib/puppet_spec/validators.rb
puppet-6.11.1-x64-mingw32 spec/lib/puppet_spec/validators.rb
puppet-6.11.1-universal-darwin spec/lib/puppet_spec/validators.rb
puppet-6.11.0 spec/lib/puppet_spec/validators.rb
puppet-6.11.0-x86-mingw32 spec/lib/puppet_spec/validators.rb
puppet-6.11.0-x64-mingw32 spec/lib/puppet_spec/validators.rb
puppet-6.11.0-universal-darwin spec/lib/puppet_spec/validators.rb
puppet-6.10.1 spec/lib/puppet_spec/validators.rb
puppet-6.10.1-x86-mingw32 spec/lib/puppet_spec/validators.rb
puppet-6.10.1-x64-mingw32 spec/lib/puppet_spec/validators.rb
puppet-6.10.1-universal-darwin spec/lib/puppet_spec/validators.rb
puppet-6.4.4 spec/lib/puppet_spec/validators.rb
puppet-6.4.4-x86-mingw32 spec/lib/puppet_spec/validators.rb
puppet-6.4.4-x64-mingw32 spec/lib/puppet_spec/validators.rb
puppet-6.4.4-universal-darwin spec/lib/puppet_spec/validators.rb