[chef] Access attributes in serverspec tests excuted in a report handler


Chronological Thread 
  • From: < >
  • To:
  • Subject: [chef] Access attributes in serverspec tests excuted in a report handler
  • Date: Mon, 23 Jun 2014 06:40:07 -0700 (PDT)

Hello,

I wrote a custom chef handler to execute some rspec tests:
  class Handler < ::Chef::Handler
            def report
                ...
                result = RSpec::Core::Runner.run(existing_test_files)
                ...
            end
     ...
   end

Is it possible to access the attributes of the current chef run in these
rspec-tests? And when, how?
And if its not possible: Can I get the node or environment of the current chef
run in these rspec-tests? Then I would parse it's jsonfile.. .

Regards
iceweasel



Archive powered by MHonArc 2.6.16.

§