diff options
| author | Markus Roberts <Markus@reality.com> | 2011-04-06 16:43:15 -0700 |
|---|---|---|
| committer | Markus Roberts <Markus@reality.com> | 2011-04-06 16:43:15 -0700 |
| commit | e17cc651a9625576aa79af428bbaec702e216ac8 (patch) | |
| tree | abfe3c4341fe85f995d66817975838a00ebcbfc6 /test/lib | |
| parent | cab567274691e0f39e88d49eb503efbe58d5042c (diff) | |
| parent | 2a6c6cb8fabf82d2f2127c90db670c1a856427c5 (diff) | |
Merge branch 'feature/next/resource_application_order' into next
Diffstat (limited to 'test/lib')
| -rw-r--r-- | test/lib/puppettest/support/assertions.rb | 7 | ||||
| -rw-r--r-- | test/lib/puppettest/support/utils.rb | 19 |
2 files changed, 6 insertions, 20 deletions
diff --git a/test/lib/puppettest/support/assertions.rb b/test/lib/puppettest/support/assertions.rb index 31fa3f1da..758c126ce 100644 --- a/test/lib/puppettest/support/assertions.rb +++ b/test/lib/puppettest/support/assertions.rb @@ -46,7 +46,12 @@ module PuppetTest config = resources2catalog(*resources) transaction = Puppet::Transaction.new(config) - run_events(:evaluate, transaction, events, msg) + transaction.evaluate + newevents = transaction.events. + reject { |e| ['failure', 'audit'].include? e.status }. + collect { |e| e.name } + + assert_equal(events, newevents, "Incorrect evaluate #{msg} events") transaction end diff --git a/test/lib/puppettest/support/utils.rb b/test/lib/puppettest/support/utils.rb index bca5d9634..4ecc3819e 100644 --- a/test/lib/puppettest/support/utils.rb +++ b/test/lib/puppettest/support/utils.rb @@ -82,25 +82,6 @@ module PuppetTest::Support::Utils @mygroup = group end - def run_events(type, trans, events, msg) - case type - when :evaluate, :rollback # things are hunky-dory - else - raise Puppet::DevError, "Incorrect run_events type" - end - - method = type - - trans.send(method) - newevents = trans.events.reject { |e| ['failure', 'audit'].include? e.status }.collect { |e| - e.name - } - - assert_equal(events, newevents, "Incorrect #{type} #{msg} events") - - trans - end - def fakefile(name) ary = [basedir, "test"] ary += name.split("/") |
