summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Nasrat <pnasrat@googlemail.com>2008-10-08 15:11:44 +0100
committerJames Turnbull <james@lovedthanlost.net>2008-10-09 07:48:33 +1100
commit9c31db9500d79f29c5e5e1419ab4f616a7a2ed88 (patch)
tree34445572d39b70cadca2f3e5be75a11173cbc530
parent28534471ef91301cc6a270f826dfff0f6021f89e (diff)
downloadpuppet-9c31db9500d79f29c5e5e1419ab4f616a7a2ed88.tar.gz
puppet-9c31db9500d79f29c5e5e1419ab4f616a7a2ed88.tar.xz
puppet-9c31db9500d79f29c5e5e1419ab4f616a7a2ed88.zip
Add failing test for plugin with file and recurse
-rw-r--r--spec/unit/network/handler/fileserver.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/network/handler/fileserver.rb b/spec/unit/network/handler/fileserver.rb
index cce00d333..4ba8e712d 100644
--- a/spec/unit/network/handler/fileserver.rb
+++ b/spec/unit/network/handler/fileserver.rb
@@ -36,6 +36,10 @@ describe Puppet::Network::Handler::FileServer do
@mount.list("/aFile", false, "false").should == [["/", "file"]]
end
+ it "should list a file within a directory when given the file path with recursion" do
+ @mount.list("/aFile", true, "false").should == [["/", "file"]]
+ end
+
it "should return nil for a non-existent path" do
@mount.list("/no_such_file", false, false).should be(nil)
end
@@ -152,6 +156,10 @@ describe Puppet::Network::Handler::FileServer do
@mount = Puppet::Network::Handler::FileServer::PluginMount.new(PLUGINS)
@mount.allow("*")
end
+
+ it "should list a file within a directory when given the file path with recursion" do
+ @mount.list("facter/fact.rb", true, "false").should == [["/", "file"], ["/", "file"]]
+ end
it "should return a merged view of all plugins for all modules" do
list = @mount.list("facter",true,false)