3ecd3761cd
Previously, the test was invoking the Catalog.indirection.find method but passing in a Node instance. This used to "work" in 2.7.x, because the compiler terminus only looked at `request.key`, in this case the node name, and ignored the `request.instance`. The test appears to verify that we can compile a node with the specified facts. But the test doesn't verify that the facts are in the returned catalog (they're not). So in reality, this test is passing when it shouldn't. To pass a Node instance through to the compiler, you need to use the `use_node` option, e.g. :use_node => node.to_yaml. To pass facts, use the use the `facts` option, e.g. :facts => facts.to_yaml. Since the test passes in a Node instance, the node is cached instead of the compiled catalog, which is one of the issues described in CVE-2013-1652. This commit changes the test to pass in the node.name, and it ensures we can compile a catalog for it. |
||
---|---|---|
.. | ||
data | ||
language | ||
lib | ||
network | ||
other | ||
puppet | ||
rails | ||
ral | ||
util | ||
README | ||
Rakefile | ||
test |
README
$Id$ To run all tests, run: 'rake test'. To run an individual suite, run the file directly. e.g. cd test/util; ./utiltest.rb You might need to run some tests as root. If you do not have rake installed: gem install rake ## The following information is possibly out of date? Tests are organized into a dual hierarchy: each subdirectory is considered a test suite, and each file in the subdirectory is considered a test case. You can use any test case as an example of how to write more of them, but basically the only requirements are that they each have their own class names, their names each match /tc_.+\.r/, and that they have the following header: if __FILE__ == $0 $:.unshift '..' $:.unshift '../../lib' $blinkbase = "../.." end