Sha256: 1e055d2748078358304b718509102917d018c5ae7194a936f454ab711ae5a737

Contents?: true

Size: 757 Bytes

Versions: 36

Compression:

Stored size: 757 Bytes

Contents

require 'spec_helper'
require 'puppet/indirector/certificate/ca'

describe Puppet::SSL::Certificate::Ca do
  it "should have documentation" do
    expect(Puppet::SSL::Certificate::Ca.doc).to be_instance_of(String)
  end

  it "should use the :signeddir as the collection directory" do
    Puppet[:signeddir] = File.expand_path("/cert/dir")
    expect(Puppet::SSL::Certificate::Ca.collection_directory).to eq(Puppet[:signeddir])
  end

  it "should store the ca certificate at the :cacert location" do
    allow(Puppet.settings).to receive(:use)
    Puppet[:cacert] = File.expand_path("/ca/cert")
    file = Puppet::SSL::Certificate::Ca.new
    allow(file).to receive(:ca?).and_return(true)
    expect(file.path("whatever")).to eq(Puppet[:cacert])
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
puppet-5.5.17-x86-mingw32 spec/unit/indirector/certificate/ca_spec.rb
puppet-5.5.17 spec/unit/indirector/certificate/ca_spec.rb
puppet-5.5.17-x64-mingw32 spec/unit/indirector/certificate/ca_spec.rb
puppet-5.5.17-universal-darwin spec/unit/indirector/certificate/ca_spec.rb
puppet-5.5.16 spec/unit/indirector/certificate/ca_spec.rb
puppet-5.5.16-x86-mingw32 spec/unit/indirector/certificate/ca_spec.rb
puppet-5.5.16-x64-mingw32 spec/unit/indirector/certificate/ca_spec.rb
puppet-5.5.16-universal-darwin spec/unit/indirector/certificate/ca_spec.rb
puppet-5.5.14 spec/unit/indirector/certificate/ca_spec.rb
puppet-5.5.14-x86-mingw32 spec/unit/indirector/certificate/ca_spec.rb
puppet-5.5.14-x64-mingw32 spec/unit/indirector/certificate/ca_spec.rb
puppet-5.5.14-universal-darwin spec/unit/indirector/certificate/ca_spec.rb
puppet-5.5.13 spec/unit/indirector/certificate/ca_spec.rb
puppet-5.5.13-x86-mingw32 spec/unit/indirector/certificate/ca_spec.rb
puppet-5.5.13-x64-mingw32 spec/unit/indirector/certificate/ca_spec.rb
puppet-5.5.13-universal-darwin spec/unit/indirector/certificate/ca_spec.rb