summaryrefslogtreecommitdiffstats
path: root/spec/unit/node
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2011-04-13 16:57:11 -0700
committerNick Lewis <nick@puppetlabs.com>2011-04-13 16:57:11 -0700
commit5915814c47649bb4b957b4be4fcee5919b859451 (patch)
tree3c977fddfcfe7dd074682d62d44e919f450c3769 /spec/unit/node
parent24a277c5e805ce16e0b86e17e6cb2fbe1945ae07 (diff)
downloadpuppet-5915814c47649bb4b957b4be4fcee5919b859451.tar.gz
puppet-5915814c47649bb4b957b4be4fcee5919b859451.tar.xz
puppet-5915814c47649bb4b957b4be4fcee5919b859451.zip
Revert "(#6928) Removed --ignoreimport"
This reverts commit 24a277c5e805ce16e0b86e17e6cb2fbe1945ae07. Despite not needing --ignoreimport as an option anymore, it's still used internally and has to stay.
Diffstat (limited to 'spec/unit/node')
-rwxr-xr-xspec/unit/node/environment_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/node/environment_spec.rb b/spec/unit/node/environment_spec.rb
index b5efbd480..d1badfa3a 100755
--- a/spec/unit/node/environment_spec.rb
+++ b/spec/unit/node/environment_spec.rb
@@ -315,6 +315,14 @@ describe Puppet::Node::Environment do
lambda { @env.instance_eval { perform_initial_import } }.should raise_error(Puppet::Error)
end
+ it "should not do anything if the ignore_import settings is set" do
+ Puppet.settings[:ignoreimport] = true
+ @parser.expects(:string=).never
+ @parser.expects(:file=).never
+ @parser.expects(:parse).never
+ @env.instance_eval { perform_initial_import }
+ end
+
it "should mark the type collection as needing a reparse when there is an error parsing" do
@parser.expects(:parse).raises Puppet::ParseError.new("Syntax error at ...")
@env.stubs(:known_resource_types).returns Puppet::Resource::TypeCollection.new(@env)