summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorAndrew Parker <andy@puppetlabs.com>2013-08-08 18:03:37 -0700
committerAndrew Parker <andy@puppetlabs.com>2013-08-09 16:23:35 -0700
commit2f435358f2716f4c060244f1fe7242526cbca630 (patch)
tree1756c62cea2f0f906e64ffeea805936e66557994 /spec/lib
parented62ee7ac15ec104f5352a503a31ea124e6f7d46 (diff)
downloadpuppet-2f435358f2716f4c060244f1fe7242526cbca630.tar.gz
(#18508) Ensure resource ordering in interesting cases
From the the accepted proposal for this functionality some of the example cases have been captured as test cases.
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/puppet_spec/compiler.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/lib/puppet_spec/compiler.rb b/spec/lib/puppet_spec/compiler.rb
index a9e43e12b..7af654288 100644
--- a/spec/lib/puppet_spec/compiler.rb
+++ b/spec/lib/puppet_spec/compiler.rb
@@ -4,12 +4,19 @@ module PuppetSpec::Compiler
Puppet::Parser::Compiler.compile(node)
end
- def apply_compiled_manifest(manifest)
+ def compile_to_ral(manifest)
catalog = compile_to_catalog(manifest)
ral = catalog.to_ral
ral.finalize
+ ral
+ end
- transaction = Puppet::Transaction.new(ral)
+ def compile_to_relationship_graph(manifest)
+ compile_to_ral(manifest).relationship_graph
+ end
+
+ def apply_compiled_manifest(manifest)
+ transaction = Puppet::Transaction.new(compile_to_ral(manifest))
transaction.evaluate
transaction.report.finalize_report