chef-boneyard / minitest-chef-handler

Run minitest suites after your Chef recipes to check the status of your system.
Other
163 stars 44 forks source link

automatic detection with chef 11 does not work #47

Closed fsimmend closed 11 years ago

fsimmend commented 11 years ago

The fix applied earlier with 0.6.7 (https://github.com/calavera/minitest-chef-handler/pull/44) does not work. instead of

run_status.node.run_list.select(&:recipe?).map(&:name)

you should use

run_context.loaded_recipes

in the lookup.rb

the correct usage must be

def used_recipe_names
    if recipes = run_status.node.run_state[:seen_recipes]
       recipes.keys
    else
      run_status.run_context.loaded_recipes
   end
end
calavera commented 11 years ago

It would be amazing if you could turn that code into a pull request, so I could give you proper credit for it.

Thank you!

On Tuesday, February 26, 2013 at 6:18 AM, Felix Simmendinger wrote:

The fix applied earlier with 0.6.7 (#44 (https://github.com/calavera/minitest-chef-handler/issues/44)) does not work. instead of
run_status.node.run_list.select(&:recipe?).map(&:name)

you should use run_context.loaded_recipes

in the lookup.rb the correct usage must be def used_recipe_names if recipes = run_status.node.run_state[:seen_recipes] recipes.keys else run_status.run_context.loaded_recipes end end

— Reply to this email directly or view it on GitHub (https://github.com/calavera/minitest-chef-handler/issues/47).