summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-10-18 17:06:28 -0700
committerLuke Kanies <luke@madstop.com>2009-10-18 17:06:28 -0700
commit6ba122f62bf22c955a6923604a46a8ab22d8770b (patch)
tree251e36e5753ea15af4a3da4afaea2778fbaa5114 /spec/unit/parser
parentbca3b70437666a8b840af032cab20fc1ea4f18a2 (diff)
downloadpuppet-6ba122f62bf22c955a6923604a46a8ab22d8770b.tar.gz
puppet-6ba122f62bf22c955a6923604a46a8ab22d8770b.tar.xz
puppet-6ba122f62bf22c955a6923604a46a8ab22d8770b.zip
Fixing #2735 - node classes are immed. added to classlist
This commit adds any external node classes to the classlist at compiler initialization, so that at least those classes will be isolated from any ordering issues encountered when testing the contents of the class list during compilation. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/parser')
-rwxr-xr-xspec/unit/parser/compiler.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/unit/parser/compiler.rb b/spec/unit/parser/compiler.rb
index 41f03f2ac..adc9732dc 100755
--- a/spec/unit/parser/compiler.rb
+++ b/spec/unit/parser/compiler.rb
@@ -86,6 +86,16 @@ describe Puppet::Parser::Compiler do
it "should copy the parser version to the catalog" do
@compiler.catalog.version.should == @parser.version
end
+
+ it "should copy any node classes into the class list" do
+ node = Puppet::Node.new("mynode")
+ node.classes = %w{foo bar}
+ compiler = Puppet::Parser::Compiler.new(node, @parser)
+ p compiler.classlist
+
+ compiler.classlist.should include("foo")
+ compiler.classlist.should include("bar")
+ end
end
describe "when managing scopes" do