~mathiaz/puppet/reductivelabs-master

« back to all changes in this revision

Viewing changes to spec/unit/indirector/key/file.rb

  • Committer: Luke Kanies
  • Date: 2008-04-17 23:09:33 UTC
  • Revision ID: git-v1:d8bb81eabb6ad85d985ae7407e4260e800a0cf30
Moving all of the ca-specific settings to the ca_file
terminus classes, rather than the normal :file classes.

This is unfortunately complicated, and it means that the Key
:ca_file is only ever actually used for retrieving the CA key
itself.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
        Puppet::SSL::Key::File.collection_directory.should == "/key/dir"
18
18
    end
19
19
 
20
 
    it "should store the ca key at the :cakey location" do
21
 
        Puppet.settings.stubs(:use)
22
 
        Puppet.settings.stubs(:value).returns "whatever"
23
 
        Puppet.settings.stubs(:value).with(:cakey).returns "/ca/key"
24
 
        file = Puppet::SSL::Key::File.new
25
 
        file.stubs(:ca?).returns true
26
 
        file.path("whatever").should == "/ca/key"
27
 
    end
28
 
 
29
20
    describe "when choosing the path for the public key" do
30
21
        it "should use the :capub setting location if the key is for the certificate authority" do
31
22
            Puppet.settings.stubs(:value).returns "/fake/dir"