diff options
| author | Luke Kanies <luke@madstop.com> | 2009-01-28 12:26:03 -0600 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2009-02-06 21:27:29 +1100 |
| commit | 500ea2020f95f8e96663f4a56d43be62819ef929 (patch) | |
| tree | 5107c59901586307b12658d8f2485cdf011bf7b5 /spec/unit/parser | |
| parent | 140786570176f5fcd8774f83fbf0bf4087a2cc32 (diff) | |
| download | puppet-500ea2020f95f8e96663f4a56d43be62819ef929.tar.gz puppet-500ea2020f95f8e96663f4a56d43be62819ef929.tar.xz puppet-500ea2020f95f8e96663f4a56d43be62819ef929.zip | |
Fixing #1914 - 'undef' relationship metaparameters do not stack
This allows you to specify that a metaparameter is undef
inside a definition and keep any parameters from being
inherited from the parent.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/parser')
| -rwxr-xr-x | spec/unit/parser/resource.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/unit/parser/resource.rb b/spec/unit/parser/resource.rb index 648f3a6b4..410494d43 100755 --- a/spec/unit/parser/resource.rb +++ b/spec/unit/parser/resource.rb @@ -195,6 +195,15 @@ describe Puppet::Parser::Resource do @resource["require"].sort.should == %w{container resource} end + it "should not stack relationship metaparams that are set to 'undef'" do + @resource.set_parameter("require", :undef) + @scope.setvar("require", "container") + + @resource.class.publicize_methods(:add_metaparams) { @resource.add_metaparams } + + @resource["require"].should == :undef + end + it "should flatten the array resulting from stacking relationship metaparams" do @resource.set_parameter("require", ["resource1", "resource2"]) @scope.setvar("require", %w{container1 container2}) |
