summaryrefslogtreecommitdiffstats
path: root/spec/unit/indirector/key/file.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-04-18 10:49:58 -0500
committerLuke Kanies <luke@madstop.com>2008-04-18 10:49:58 -0500
commit92a7d76e8a160ba1ddb684d52eab6639cf801cb7 (patch)
tree0c82d00456eae10d6208c0cce93a4c2092568913 /spec/unit/indirector/key/file.rb
parentfb56deae3488e5d97e10e38cba98393a5a8f8414 (diff)
downloadpuppet-92a7d76e8a160ba1ddb684d52eab6639cf801cb7.tar.gz
puppet-92a7d76e8a160ba1ddb684d52eab6639cf801cb7.tar.xz
puppet-92a7d76e8a160ba1ddb684d52eab6639cf801cb7.zip
All SSL terminus classes now force the CA information into the right place.
Without this, then you could end up duplicating your CA key into the normal directory depending on how caching was set up. Again, this design aspect isn't the most straightforward, but at least it's functional now.
Diffstat (limited to 'spec/unit/indirector/key/file.rb')
-rwxr-xr-xspec/unit/indirector/key/file.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/unit/indirector/key/file.rb b/spec/unit/indirector/key/file.rb
index bd0c57c36..8a1cb04bd 100755
--- a/spec/unit/indirector/key/file.rb
+++ b/spec/unit/indirector/key/file.rb
@@ -17,6 +17,15 @@ describe Puppet::SSL::Key::File do
Puppet::SSL::Key::File.collection_directory.should == "/key/dir"
end
+ it "should store the ca key at the :cakey location" do
+ Puppet.settings.stubs(:use)
+ Puppet.settings.stubs(:value).returns "whatever"
+ Puppet.settings.stubs(:value).with(:cakey).returns "/ca/key"
+ file = Puppet::SSL::Key::File.new
+ file.stubs(:ca?).returns true
+ file.path("whatever").should == "/ca/key"
+ end
+
describe "when choosing the path for the public key" do
it "should use the :capub setting location if the key is for the certificate authority" do
Puppet.settings.stubs(:value).returns "/fake/dir"