diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-07-09 00:06:13 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-07-09 00:06:13 +0000 |
| commit | 1bcca319521987f5b7aa94ef16d3b3f0d41bde7f (patch) | |
| tree | bc55678cfbe72986bd896bd263b58a3a753eb92e /test | |
| parent | 8a7fe9fedfcf67f9415a2ecf7fd74f6032d39d8b (diff) | |
Fixing #687.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2662 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
| -rwxr-xr-x | test/language/interpreter.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/language/interpreter.rb b/test/language/interpreter.rb index 1eeb65b1a..302c7e336 100755 --- a/test/language/interpreter.rb +++ b/test/language/interpreter.rb @@ -853,6 +853,18 @@ class TestInterpreter < PuppetTest::TestCase assert(scope.classlist.include?("sub"), "NodeDef did not evaluate class") assert(scope.classlist.include?("other"), "NodeDef did not evaluate other class") + + # Now make sure nodedef doesn't fail when some classes are not defined (#687). + assert_nothing_raised("Could not create a node definition with some invalid classes") do + node = NodeDef.new :name => "yay", :classes => %w{base unknown} + end + + scope = mkscope :interp => interp + assert_nothing_raised("Could not evaluate the node definition with some invalid classes") do + node.evaluate(:scope => scope) + end + + assert(scope.classlist.include?("base"), "NodeDef did not evaluate class") end # This can stay in the main test suite because it doesn't actually use ldapsearch, |
