diff options
| author | Luke Kanies <luke@madstop.com> | 2007-10-20 15:06:11 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2007-10-20 15:06:11 -0500 |
| commit | 8f827ffe4fa1aa25a2e3c7903967e87c55766996 (patch) | |
| tree | c7d5015f0a5a77742bc84e4a2d21d4689b2a0d3e /spec | |
| parent | 08099b7a383987e292357f285e05933e10205660 (diff) | |
Renaming the 'mounts' terminus to 'file_server', and renaming
tests accordingly.
Diffstat (limited to 'spec')
| -rwxr-xr-x | spec/integration/indirector/file_content/file_server.rb | 18 | ||||
| -rwxr-xr-x | spec/integration/indirector/file_content/mounts.rb | 18 | ||||
| -rwxr-xr-x | spec/integration/indirector/file_metadata/file_server.rb | 18 | ||||
| -rwxr-xr-x | spec/integration/indirector/file_metadata/mounts.rb | 18 | ||||
| -rw-r--r-- | spec/lib/shared_behaviours/file_server_terminus.rb (renamed from spec/lib/shared_behaviours/file_server_mounts.rb) | 4 | ||||
| -rw-r--r-- | spec/lib/shared_behaviours/file_serving.rb | 8 | ||||
| -rwxr-xr-x | spec/unit/file_serving/terminus_selector.rb | 8 | ||||
| -rwxr-xr-x | spec/unit/indirector/file_content/file_server.rb (renamed from spec/unit/indirector/file_content/mounts.rb) | 8 | ||||
| -rwxr-xr-x | spec/unit/indirector/file_metadata/file_server.rb (renamed from spec/unit/indirector/file_metadata/mounts.rb) | 8 |
9 files changed, 53 insertions, 55 deletions
diff --git a/spec/integration/indirector/file_content/file_server.rb b/spec/integration/indirector/file_content/file_server.rb new file mode 100755 index 000000000..965bd8fd1 --- /dev/null +++ b/spec/integration/indirector/file_content/file_server.rb @@ -0,0 +1,18 @@ +#!/usr/bin/env ruby +# +# Created by Luke Kanies on 2007-10-18. +# Copyright (c) 2007. All rights reserved. + +require File.dirname(__FILE__) + '/../../../spec_helper' + +require 'puppet/indirector/file_content/file_server' +require 'shared_behaviours/file_server_terminus' + +describe Puppet::Indirector::FileContent::FileServer, " when finding files" do + it_should_behave_like "Puppet::Indirector::FileServerTerminus" + + before do + @terminus = Puppet::Indirector::FileContent::FileServer.new + @test_class = Puppet::FileServing::Content + end +end diff --git a/spec/integration/indirector/file_content/mounts.rb b/spec/integration/indirector/file_content/mounts.rb deleted file mode 100755 index cd80825c7..000000000 --- a/spec/integration/indirector/file_content/mounts.rb +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env ruby -# -# Created by Luke Kanies on 2007-10-18. -# Copyright (c) 2007. All rights reserved. - -require File.dirname(__FILE__) + '/../../../spec_helper' - -require 'puppet/indirector/file_content/mounts' -require 'shared_behaviours/file_server_mounts' - -describe Puppet::Indirector::FileContent::Mounts, " when finding files" do - it_should_behave_like "Puppet::Indirector::FileServerMounts" - - before do - @terminus = Puppet::Indirector::FileContent::Mounts.new - @test_class = Puppet::FileServing::Content - end -end diff --git a/spec/integration/indirector/file_metadata/file_server.rb b/spec/integration/indirector/file_metadata/file_server.rb new file mode 100755 index 000000000..7caa2e4de --- /dev/null +++ b/spec/integration/indirector/file_metadata/file_server.rb @@ -0,0 +1,18 @@ +#!/usr/bin/env ruby +# +# Created by Luke Kanies on 2007-10-18. +# Copyright (c) 2007. All rights reserved. + +require File.dirname(__FILE__) + '/../../../spec_helper' + +require 'puppet/indirector/file_metadata/file_server' +require 'shared_behaviours/file_server_terminus' + +describe Puppet::Indirector::FileMetadata::FileServer, " when finding files" do + it_should_behave_like "Puppet::Indirector::FileServerTerminus" + + before do + @terminus = Puppet::Indirector::FileMetadata::FileServer.new + @test_class = Puppet::FileServing::Metadata + end +end diff --git a/spec/integration/indirector/file_metadata/mounts.rb b/spec/integration/indirector/file_metadata/mounts.rb deleted file mode 100755 index 5899a9dbd..000000000 --- a/spec/integration/indirector/file_metadata/mounts.rb +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env ruby -# -# Created by Luke Kanies on 2007-10-18. -# Copyright (c) 2007. All rights reserved. - -require File.dirname(__FILE__) + '/../../../spec_helper' - -require 'puppet/indirector/file_metadata/mounts' -require 'shared_behaviours/file_server_mounts' - -describe Puppet::Indirector::FileMetadata::Mounts, " when finding files" do - it_should_behave_like "Puppet::Indirector::FileServerMounts" - - before do - @terminus = Puppet::Indirector::FileMetadata::Mounts.new - @test_class = Puppet::FileServing::Metadata - end -end diff --git a/spec/lib/shared_behaviours/file_server_mounts.rb b/spec/lib/shared_behaviours/file_server_terminus.rb index 99a2f2953..93634e7dc 100644 --- a/spec/lib/shared_behaviours/file_server_mounts.rb +++ b/spec/lib/shared_behaviours/file_server_terminus.rb @@ -3,7 +3,7 @@ # Created by Luke Kanies on 2007-10-18. # Copyright (c) 2007. All rights reserved. -describe "Puppet::Indirector::FileServerMounts", :shared => true do +describe "Puppet::Indirector::FileServerTerminus", :shared => true do # This only works if the shared behaviour is included before # the 'before' block in the including context. before do @@ -22,8 +22,6 @@ describe "Puppet::Indirector::FileServerMounts", :shared => true do Puppet::FileServing::Configuration::Parser.stubs(:new).returns(@parser) - Puppet::FileServing::Configuration.create.stubs(:modules_mount) - # Stub out the modules terminus @modules = mock 'modules terminus' end diff --git a/spec/lib/shared_behaviours/file_serving.rb b/spec/lib/shared_behaviours/file_serving.rb index ffc96ee78..5c1d87015 100644 --- a/spec/lib/shared_behaviours/file_serving.rb +++ b/spec/lib/shared_behaviours/file_serving.rb @@ -18,19 +18,19 @@ describe "Puppet::FileServing::Files", :shared => true do @test_class.find(uri) end - it "should use the mounts terminus when the 'puppet' URI scheme is used, no host name is present, and the process name is 'puppet'" 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:///mymod/my/file" Puppet.settings.stubs(:value).with(:name).returns("puppet") Puppet.settings.stubs(:value).with(:modulepath).returns("") Puppet.settings.stubs(:value).with(:libdir).returns("") Puppet.settings.stubs(:value).with(:fileserverconfig).returns("/whatever") - @indirection.terminus(:mounts).expects(:find).with(uri) + @indirection.terminus(:file_server).expects(:find).with(uri) @test_class.find(uri) end - it "should use the mounts terminus when the 'puppetmounts' URI scheme is used" do + it "should use the file_server terminus when the 'puppetmounts' URI scheme is used" do uri = "puppetmounts:///mymod/my/file" - @indirection.terminus(:mounts).expects(:find).with(uri) + @indirection.terminus(:file_server).expects(:find).with(uri) @test_class.find(uri) end diff --git a/spec/unit/file_serving/terminus_selector.rb b/spec/unit/file_serving/terminus_selector.rb index 341c60fea..c5520e2f8 100755 --- a/spec/unit/file_serving/terminus_selector.rb +++ b/spec/unit/file_serving/terminus_selector.rb @@ -39,13 +39,13 @@ describe Puppet::FileServing::TerminusSelector, " when being used to select term @object.select_terminus("puppet:///modules/mymod/file").should == :modules end - it "should choose :mounts when the protocol is 'puppetmounts' and the mount name is not 'modules'" do - @object.select_terminus("puppetmounts://host/notmodules/file").should == :mounts + it "should choose :file_server when the protocol is 'puppetmounts' and the mount name is not 'modules'" do + @object.select_terminus("puppetmounts://host/notmodules/file").should == :file_server end - it "should choose :mounts when no server name is provided, the process name is 'puppet', and the mount name is not 'modules'" do + it "should choose :file_server when no server name is provided, the process name is 'puppet', and the mount name is not 'modules'" do Puppet.settings.expects(:value).with(:name).returns("puppet") - @object.select_terminus("puppet:///notmodules/file").should == :mounts + @object.select_terminus("puppet:///notmodules/file").should == :file_server end it "should choose :rest when no server name is provided and the process name is not 'puppet'" do diff --git a/spec/unit/indirector/file_content/mounts.rb b/spec/unit/indirector/file_content/file_server.rb index 00149dfd4..a09c7e2f7 100755 --- a/spec/unit/indirector/file_content/mounts.rb +++ b/spec/unit/indirector/file_content/file_server.rb @@ -5,14 +5,14 @@ require File.dirname(__FILE__) + '/../../../spec_helper' -require 'puppet/indirector/file_content/mounts' +require 'puppet/indirector/file_content/file_server' -describe Puppet::Indirector::FileContent::Mounts do +describe Puppet::Indirector::FileContent::FileServer do it "should be registered with the file_content indirection" do - Puppet::Indirector::Terminus.terminus_class(:file_content, :mounts).should equal(Puppet::Indirector::FileContent::Mounts) + Puppet::Indirector::Terminus.terminus_class(:file_content, :file_server).should equal(Puppet::Indirector::FileContent::FileServer) end it "should be a subclass of the FileServer terminus" do - Puppet::Indirector::FileContent::Mounts.superclass.should equal(Puppet::Indirector::FileServer) + Puppet::Indirector::FileContent::FileServer.superclass.should equal(Puppet::Indirector::FileServer) end end diff --git a/spec/unit/indirector/file_metadata/mounts.rb b/spec/unit/indirector/file_metadata/file_server.rb index 33f977163..40232a108 100755 --- a/spec/unit/indirector/file_metadata/mounts.rb +++ b/spec/unit/indirector/file_metadata/file_server.rb @@ -5,14 +5,14 @@ require File.dirname(__FILE__) + '/../../../spec_helper' -require 'puppet/indirector/file_metadata/mounts' +require 'puppet/indirector/file_metadata/file_server' -describe Puppet::Indirector::FileMetadata::Mounts do +describe Puppet::Indirector::FileMetadata::FileServer do it "should be registered with the file_metadata indirection" do - Puppet::Indirector::Terminus.terminus_class(:file_metadata, :mounts).should equal(Puppet::Indirector::FileMetadata::Mounts) + Puppet::Indirector::Terminus.terminus_class(:file_metadata, :file_server).should equal(Puppet::Indirector::FileMetadata::FileServer) end it "should be a subclass of the FileServer terminus" do - Puppet::Indirector::FileMetadata::Mounts.superclass.should equal(Puppet::Indirector::FileServer) + Puppet::Indirector::FileMetadata::FileServer.superclass.should equal(Puppet::Indirector::FileServer) end end |
