summaryrefslogtreecommitdiffstats
path: root/spec/shared_behaviours
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-02-18 16:33:47 -0600
committerLuke Kanies <luke@madstop.com>2009-02-19 17:50:28 -0600
commitd3bc1e8279b6e1d372ab3624982788cde026461d (patch)
tree549d4365b52e7aea1cddf7365368d34cdb980b93 /spec/shared_behaviours
parent00726bac02211be3c269c23a564bdcc8fdd28c2b (diff)
downloadpuppet-d3bc1e8279b6e1d372ab3624982788cde026461d.tar.gz
puppet-d3bc1e8279b6e1d372ab3624982788cde026461d.tar.xz
puppet-d3bc1e8279b6e1d372ab3624982788cde026461d.zip
Adding pluginsyncing support to the Indirector
This switches away from the use of terminii for each type of fileserving - it goes back to the traditional fileserving method, and is much cleaner and simpler as a result. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/shared_behaviours')
-rw-r--r--spec/shared_behaviours/file_server_terminus.rb2
-rw-r--r--spec/shared_behaviours/file_serving.rb7
2 files changed, 5 insertions, 4 deletions
diff --git a/spec/shared_behaviours/file_server_terminus.rb b/spec/shared_behaviours/file_server_terminus.rb
index 1db6cfa0e..674651cbd 100644
--- a/spec/shared_behaviours/file_server_terminus.rb
+++ b/spec/shared_behaviours/file_server_terminus.rb
@@ -20,7 +20,7 @@ describe "Puppet::Indirector::FileServerTerminus", :shared => true do
File.open(File.join(@path, "myfile"), "w") { |f| f.print "my content" }
# Use a real mount, so the integration is a bit deeper.
- @mount1 = Puppet::FileServing::Configuration::Mount.new("one")
+ @mount1 = Puppet::FileServing::Configuration::Mount::File.new("one")
@mount1.path = @path
@parser = stub 'parser', :changed? => false
diff --git a/spec/shared_behaviours/file_serving.rb b/spec/shared_behaviours/file_serving.rb
index 99994b99a..8aad8885a 100644
--- a/spec/shared_behaviours/file_serving.rb
+++ b/spec/shared_behaviours/file_serving.rb
@@ -26,7 +26,7 @@ describe "Puppet::FileServing::Files", :shared => true do
it "should use the file_server terminus when the 'puppet' URI scheme is used, no host name is present, and the process name is 'puppet'" do
uri = "puppet:///fakemod/my/file"
- Puppet::Node::Environment.stubs(:new).returns(stub("env", :name => "testing"))
+ Puppet::Node::Environment.stubs(:new).returns(stub("env", :name => "testing", :module => nil))
Puppet.settings.stubs(:value).returns ""
Puppet.settings.stubs(:value).with(:name).returns("puppet")
Puppet.settings.stubs(:value).with(:fileserverconfig).returns("/whatever")
@@ -49,11 +49,12 @@ describe "Puppet::FileServing::Files", :shared => true do
it "should use the configuration to test whether the request is allowed" do
uri = "fakemod/my/file"
- config = mock 'configuration'
+ mount = mock 'mount'
+ config = stub 'configuration', :split_path => [mount, "eh"]
@indirection.terminus(:file_server).stubs(:configuration).returns config
@indirection.terminus(:file_server).expects(:find)
- config.expects(:authorized?).returns(true)
+ mount.expects(:allowed?).returns(true)
@test_class.find(uri, :node => "foo", :ip => "bar")
end
end