Sha256: 2b8d0f57c8beba8958ea810ceb1c9e1da285bd539de5615de0e9ca21873244fc

Contents?: true

Size: 1.16 KB

Versions: 68

Compression:

Stored size: 1.16 KB

Contents

#! /usr/bin/env ruby
require 'spec_helper'

require 'puppet/indirector/certificate_revocation_list/rest'

describe Puppet::SSL::CertificateRevocationList::Rest do
  before do
    @searcher = Puppet::SSL::CertificateRevocationList::Rest.new
  end

  it "should be a sublcass of Puppet::Indirector::REST" do
    expect(Puppet::SSL::CertificateRevocationList::Rest.superclass).to equal(Puppet::Indirector::REST)
  end

  it "should set server_setting to :ca_server" do
    expect(Puppet::SSL::CertificateRevocationList::Rest.server_setting).to eq(:ca_server)
  end

  it "should set port_setting to :ca_port" do
    expect(Puppet::SSL::CertificateRevocationList::Rest.port_setting).to eq(:ca_port)
  end

  it "should use the :ca SRV service" do
    expect(Puppet::SSL::CertificateRevocationList::Rest.srv_service).to eq(:ca)
  end

  it "temporarily disables revocation checking when finding a CRL and no CRL is available" do
    Puppet::FileSystem.expects(:exist?).with(Puppet[:hostcrl]).returns false
    Puppet.override({:certificate_revocation => :chain}) do
      Puppet.expects(:override).with({:certificate_revocation => false}, anything)
      subject.find(nil)
    end
  end
end

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
puppet-5.5.12 spec/unit/indirector/certificate_revocation_list/rest_spec.rb
puppet-5.5.12-x86-mingw32 spec/unit/indirector/certificate_revocation_list/rest_spec.rb
puppet-5.5.12-x64-mingw32 spec/unit/indirector/certificate_revocation_list/rest_spec.rb
puppet-5.5.12-universal-darwin spec/unit/indirector/certificate_revocation_list/rest_spec.rb
puppet-5.5.10 spec/unit/indirector/certificate_revocation_list/rest_spec.rb
puppet-5.5.10-x86-mingw32 spec/unit/indirector/certificate_revocation_list/rest_spec.rb
puppet-5.5.10-x64-mingw32 spec/unit/indirector/certificate_revocation_list/rest_spec.rb
puppet-5.5.10-universal-darwin spec/unit/indirector/certificate_revocation_list/rest_spec.rb
puppet-5.5.8 spec/unit/indirector/certificate_revocation_list/rest_spec.rb
puppet-5.5.8-x86-mingw32 spec/unit/indirector/certificate_revocation_list/rest_spec.rb
puppet-5.5.8-x64-mingw32 spec/unit/indirector/certificate_revocation_list/rest_spec.rb
puppet-5.5.8-universal-darwin spec/unit/indirector/certificate_revocation_list/rest_spec.rb
puppet-5.5.7 spec/unit/indirector/certificate_revocation_list/rest_spec.rb
puppet-5.5.7-x86-mingw32 spec/unit/indirector/certificate_revocation_list/rest_spec.rb
puppet-5.5.7-x64-mingw32 spec/unit/indirector/certificate_revocation_list/rest_spec.rb
puppet-5.5.7-universal-darwin spec/unit/indirector/certificate_revocation_list/rest_spec.rb
puppet-5.5.6 spec/unit/indirector/certificate_revocation_list/rest_spec.rb
puppet-5.5.6-x86-mingw32 spec/unit/indirector/certificate_revocation_list/rest_spec.rb
puppet-5.5.6-x64-mingw32 spec/unit/indirector/certificate_revocation_list/rest_spec.rb
puppet-5.5.6-universal-darwin spec/unit/indirector/certificate_revocation_list/rest_spec.rb