From 61fd460cb0e9db08e21b2e9ce24b24bc2e96b0be Mon Sep 17 00:00:00 2001 From: Jesse Wolfe Date: Thu, 17 Dec 2009 17:21:45 -0800 Subject: Fix #2924 Test Failed: Puppet::Indirector::FileContent::FileServer when finding files should find plugin file content in the environment specified in the request The change in #2590 (ea584787) clears the environment list that this spec relies on. Reordered the spec so that doesn't happen anymore. Signed-off-by: Jesse Wolfe --- spec/integration/indirector/file_content/file_server.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/integration/indirector/file_content/file_server.rb b/spec/integration/indirector/file_content/file_server.rb index ea892302e..e8f777ef8 100755 --- a/spec/integration/indirector/file_content/file_server.rb +++ b/spec/integration/indirector/file_content/file_server.rb @@ -29,9 +29,10 @@ describe Puppet::Indirector::FileContent::FileServer, " when finding files" do file = File.join(modpath, "lib", "file.rb") File.open(file, "w") { |f| f.puts "1" } + Puppet.settings[:modulepath] = "/no/such/file" + env = Puppet::Node::Environment.new("foo") env.stubs(:modulepath).returns [path] - Puppet.settings[:modulepath] = "/no/such/file" result = Puppet::FileServing::Content.search("plugins", :environment => "foo", :recurse => true) -- cgit