diff options
author | Jesse Wolfe <jes5199@gmail.com> | 2010-08-27 12:49:54 -0700 |
---|---|---|
committer | Jesse Wolfe <jes5199@gmail.com> | 2010-08-27 12:50:26 -0700 |
commit | 21afb51a1b84116b2a906a6959ae588f45135104 (patch) | |
tree | 48fa0438d0a50202194956344d0cf1f10b17b818 /spec/shared_behaviours/file_serving.rb | |
parent | 1f3070c4bc77b38e3dd6170cf6a58bee7ec337ac (diff) | |
parent | 8be1929043f4560bb17a4b06293b3f9a4efcfdbf (diff) | |
download | puppet-21afb51a1b84116b2a906a6959ae588f45135104.tar.gz puppet-21afb51a1b84116b2a906a6959ae588f45135104.tar.xz puppet-21afb51a1b84116b2a906a6959ae588f45135104.zip |
Merge commit '2.6.1rc3'
This synchronizes the 2.7 master branch with 2.6.1RC3
The 2.7 next branch has now diverged from master for the first time, as
if contains code that has not reached "release quality" status.
Diffstat (limited to 'spec/shared_behaviours/file_serving.rb')
-rw-r--r-- | spec/shared_behaviours/file_serving.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/shared_behaviours/file_serving.rb b/spec/shared_behaviours/file_serving.rb index c86453a03..5f5b2b0af 100644 --- a/spec/shared_behaviours/file_serving.rb +++ b/spec/shared_behaviours/file_serving.rb @@ -15,7 +15,7 @@ describe "Puppet::FileServing::Files", :shared => true do @test_class.find(uri) end - it "should use the rest terminus when the 'puppet' URI scheme is used, no host name is present, and the process name is not 'puppet'" do + it "should use the rest terminus when the 'puppet' URI scheme is used, no host name is present, and the process name is not 'puppet' or 'apply'" do uri = "puppet:///fakemod/my/file" Puppet.settings.stubs(:value).returns "foo" Puppet.settings.stubs(:value).with(:name).returns("puppetd") @@ -35,6 +35,17 @@ describe "Puppet::FileServing::Files", :shared => true do @test_class.find(uri) end + it "should use the file_server terminus when the 'puppet' URI scheme is used, no host name is present, and the process name is 'apply'" do + uri = "puppet:///fakemod/my/file" + Puppet::Node::Environment.stubs(:new).returns(stub("env", :name => "testing", :module => nil, :modulepath => [])) + Puppet.settings.stubs(:value).returns "" + Puppet.settings.stubs(:value).with(:name).returns("apply") + Puppet.settings.stubs(:value).with(:fileserverconfig).returns("/whatever") + @indirection.terminus(:file_server).expects(:find) + @indirection.terminus(:file_server).stubs(:authorized?).returns(true) + @test_class.find(uri) + end + it "should use the file terminus when the 'file' URI scheme is used" do uri = "file:///fakemod/my/file" @indirection.terminus(:file).expects(:find) |