[chef-dev] Question on Chef 12 Issue


Chronological Thread 
  • From: David Petzel < >
  • To: Chef Dev < >
  • Subject: [chef-dev] Question on Chef 12 Issue
  • Date: Fri, 5 Dec 2014 18:56:01 -0500

I'm not entirely sure which side of the fence the issue lies on and hoping someone might know
We use minitest-chef-handler for testing and we have a common pattern of doing something like this:

require_relative "support/test_helper.rb"

describe_recipe 'cookbook::default' do
  include MyCokbook::Test::Helper
  MiniTest::Chef::Resources.register_resource(:chef_gem)
  describe "gems" do
    it "ensures the netaddr gem is installed" do
      chef_gem("netaddr").must_be_installed
    end
  end
end

The key line appears to be MiniTest::Chef::Resources.register_resource(:chef_gem).

This worked on Chef 11, however is failing on Chef 12 with this error

ArgumentError: Cannot find a provider for chef_gem[netaddr] on centos version 6.5
from /opt/chef/embedded/apps/chef/lib/chef/platform/provider_mapping.rb:552:in `find_provider'

Given the changes for the Dynamic Provider Resolver, does this appear to be more of a Chef bug, or a breaking change that minitest-chef-handler will need to updated to accomodate?

Thanks




Archive powered by MHonArc 2.6.16.

§