diff options
| author | Luke Kanies <luke@puppetlabs.com> | 2010-05-19 09:32:44 -0700 |
|---|---|---|
| committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
| commit | e9627a060619eaf0f8eeb012979dddb047c6648e (patch) | |
| tree | 697304e0850d89aad99fca266e7dcd809775992d /spec/unit/parser | |
| parent | 61a719f41c5448ca9ab7bdbd6a05f6c97ee80b7f (diff) | |
| download | puppet-e9627a060619eaf0f8eeb012979dddb047c6648e.tar.gz puppet-e9627a060619eaf0f8eeb012979dddb047c6648e.tar.xz puppet-e9627a060619eaf0f8eeb012979dddb047c6648e.zip | |
Fixing #2658 - adding backward compatibility for 0.24
The way stages were implemented caused backward compatibility
to be completely broken for 0.24.x.
This commit fixes that, mostly by assuming Stage[main] will be the
top node in the graph rather than Class[main].
Other stages are not supported in 0.24.x, and explicitly throw a warning
(although not an error).
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Diffstat (limited to 'spec/unit/parser')
| -rwxr-xr-x | spec/unit/parser/compiler.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/parser/compiler.rb b/spec/unit/parser/compiler.rb index e7d336583..fb210bc02 100755 --- a/spec/unit/parser/compiler.rb +++ b/spec/unit/parser/compiler.rb @@ -200,6 +200,14 @@ describe Puppet::Parser::Compiler do @known_resource_types.find_hostclass([""], "").should be_instance_of(Puppet::Resource::Type) end + it "should add an edge between the main stage and main class" do + @compiler.compile + (stage = @compiler.catalog.resource(:stage, "main")).should be_instance_of(Puppet::Parser::Resource) + (klass = @compiler.catalog.resource(:class, "")).should be_instance_of(Puppet::Parser::Resource) + + @compiler.catalog.edge?(stage, klass).should be_true + end + it "should evaluate any node classes" do @node.stubs(:classes).returns(%w{one two three four}) @compiler.expects(:evaluate_classes).with(%w{one two three four}, @compiler.topscope) |
