summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2009-07-20 23:09:09 +0200
committerJames Turnbull <james@lovedthanlost.net>2009-07-21 08:05:17 +1000
commit17205bb4e5d246f7a47b995826927a38b83fb3d0 (patch)
tree3774ff280ea0083c5be11fdcd8ba0294ed6733c1 /spec
parentf2c55cc6b4dd6a4db307ea1c031120398fe5fc7e (diff)
Fix #2424 - take 2, make sure default mounts allow every clients
If there isn't any default mounts for plugins/modules, puppet auto creates them. The issue is that they don't have any authorization attached, so they default to deny all. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/file_serving/configuration.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/unit/file_serving/configuration.rb b/spec/unit/file_serving/configuration.rb
index 9545f01cc..57ae83a14 100755
--- a/spec/unit/file_serving/configuration.rb
+++ b/spec/unit/file_serving/configuration.rb
@@ -102,6 +102,19 @@ describe Puppet::FileServing::Configuration do
config.mounted?("plugins").should be_true
end
+ it "should allow all access to modules and plugins if no fileserver.conf exists" do
+ FileTest.expects(:exists?).returns false # the file doesn't exist
+ modules = stub 'modules'
+ Puppet::FileServing::Mount::Modules.stubs(:new).returns(modules)
+ modules.expects(:allow).with('*')
+
+ plugins = stub 'plugins'
+ Puppet::FileServing::Mount::Plugins.stubs(:new).returns(plugins)
+ plugins.expects(:allow).with('*')
+
+ Puppet::FileServing::Configuration.create
+ end
+
it "should add modules and plugins mounts even if they are not returned by the parser" do
@parser.expects(:parse).returns("one" => mock("mount"))
FileTest.expects(:exists?).returns true # the file doesn't exist