- From: "Julian C. Dunn" <
>
- To: "
" <
>
- Subject: [chef] Re: Access attributes in serverspec tests excuted in a report handler
- Date: Mon, 23 Jun 2014 11:19:15 -0400
I don't recommend this approach, because you're conflating the
variables of the system under test with the test vectors, so how do
you know if you have a valid test?
However, that said, this is the approach that the Chef Minitest
Handler takes, so you might want to check that out.
- Julian
On Mon, Jun 23, 2014 at 9:40 AM,
<
>
wrote:
>
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
--
[ Julian C. Dunn
<
>
* Sorry, I'm ]
[ WWW:
http://www.aquezada.com/staff/julian * only Web 1.0 ]
[
gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]
Archive powered by MHonArc 2.6.16.