Sha256: a3d26d430bd5b66fe06d4d004a442501d6cd8b6eb69925ef97b094844f617838
Contents?: true
Size: 870 Bytes
Versions: 36
Compression:
Stored size: 870 Bytes
Contents
require 'spec_helper' require 'puppet/indirector/key/disabled_ca' describe Puppet::SSL::Key::DisabledCa do def request(type, remote) r = Puppet::Indirector::Request.new(:key, type, "foo.com", nil) if remote r.ip = '10.0.0.1' r.node = 'agent.example.com' end r end context "when not a CA" do before :each do Puppet[:ca] = false Puppet::SSL::Host.ca_location = :none end [:find, :head, :search, :save, :destroy].each do |name| it "should fail remote #{name} requests" do expect { subject.send(name, request(name, true)) }. to raise_error Puppet::Error, /is not a CA/ end it "should forward local #{name} requests" do expect(Puppet::SSL::Key.indirection.terminus(:file)).to receive(name) subject.send(name, request(name, false)) end end end end
Version data entries
36 entries across 36 versions & 1 rubygems