summaryrefslogtreecommitdiffstats
path: root/spec/unit/application
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-07-19 14:19:26 -0700
committerMatt Robinson <matt@puppetlabs.com>2011-07-25 12:56:57 -0700
commit89c021cac52a4bdecbe490772cb73cef9ef049c5 (patch)
treeb75b6589df4e48a507f0066fd8ab14ce99d39039 /spec/unit/application
parent3165364e20fc008b3997effafb290fe47c13bf42 (diff)
downloadpuppet-89c021cac52a4bdecbe490772cb73cef9ef049c5.tar.gz
puppet-89c021cac52a4bdecbe490772cb73cef9ef049c5.tar.xz
puppet-89c021cac52a4bdecbe490772cb73cef9ef049c5.zip
(#8418) Fix inspect app to have the correct run_mode
Requiring puppet before the run_mode has been set by the application causes the default run_mode of 'user' to be set instead of what the application wants. This leads to the incorrect default settings to be used, which lead to inspect not being able to properly retrieve file metadata from a fileserver. Reviewed-by: Max Martin <max@puppetlabs.com>
Diffstat (limited to 'spec/unit/application')
-rwxr-xr-xspec/unit/application/inspect_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/application/inspect_spec.rb b/spec/unit/application/inspect_spec.rb
index d334a87ee..637a95d42 100755
--- a/spec/unit/application/inspect_spec.rb
+++ b/spec/unit/application/inspect_spec.rb
@@ -13,6 +13,11 @@ describe Puppet::Application::Inspect do
before :each do
@inspect = Puppet::Application[:inspect]
+ @inspect.preinit
+ end
+
+ it "should operate in agent run_mode" do
+ @inspect.class.run_mode.name.should == :agent
end
describe "during setup" do