summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2010-07-24 21:55:42 -0700
committerMarkus Roberts <Markus@reality.com>2010-07-25 22:24:28 -0700
commit067a46db27a746a680f8afbb32bb5317ce7a7056 (patch)
treedf1a92d83619425b2cc5284d35a85afcba308d8a
parent9778f2a47922a66e59d571c1c98552223a817ce1 (diff)
downloadpuppet-067a46db27a746a680f8afbb32bb5317ce7a7056.tar.gz
puppet-067a46db27a746a680f8afbb32bb5317ce7a7056.tar.xz
puppet-067a46db27a746a680f8afbb32bb5317ce7a7056.zip
Temporary tweak to tests for #4242
The tests introduced with the fix for #4242 have isolation issues apparently due to the creation of a stage resource which is global and persistent. This patch stubs the creation, marks the one test which is thus invalidated pending, and adds comments noting the problem.
-rw-r--r--spec/unit/parser/functions/include_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/parser/functions/include_spec.rb b/spec/unit/parser/functions/include_spec.rb
index 4954ac63a..e5f051906 100644
--- a/spec/unit/parser/functions/include_spec.rb
+++ b/spec/unit/parser/functions/include_spec.rb
@@ -8,6 +8,10 @@ describe "the 'include' function" do
Puppet::Node::Environment.stubs(:current).returns(nil)
@compiler = Puppet::Parser::Compiler.new(Puppet::Node.new("foo"))
@scope = Puppet::Parser::Scope.new(:compiler => @compiler)
+ # MQR TODO: Without the following stub these tests cause hundreds of spurious errors in
+ # subsequent tests. With it, there are no spurious failures and all but one
+ # of the tests (marked pending, bellow) fail. This needs a better solution.
+ Puppet::Parser::Resource.stubs(:new).with('stage', :main, :scope => @scope).returns 'foo'
end
it "should exist" do
@@ -32,6 +36,7 @@ describe "the 'include' function" do
end
it "should allow a parent to include its child" do
+ pending "Resolution of MQR TODO item, above"
@parent_type = Puppet::Resource::Type.new(:hostclass, "parent")
@parent_resource = Puppet::Parser::Resource.new(:hostclass, "parent", :scope => @scope)
@subscope = @parent_type.subscope(@scope,@parent_resource)