[chef] Minitest dependencies in test-kitchen


Chronological Thread 
  • From: John Dewey < >
  • To:
  • Subject: [chef] Minitest dependencies in test-kitchen
  • Date: Sun, 2 Sep 2012 11:36:45 -0700


I am in the process of adding configuration support to the openssh community cookbook.
I created a config.rb recipe that handles the templating.  However, I am running into problems testing it.

The config.rb writes out a template and notifies the ssh service.  The ssh service is defined in default.rb (by default),
and I encounter the following error.  Is there a way around this?

[Sun, 02 Sep 2012 18:28:27 +0000] DEBUG: Found recipe config in cookbook openssh                                                                                        [80/987]
[Sun, 02 Sep 2012 18:28:27 +0000] ERROR: Running exception handlers
[Sun, 02 Sep 2012 18:28:27 +0000] ERROR: Exception handlers complete
[Sun, 02 Sep 2012 18:28:27 +0000] DEBUG: Re-raising exception: Chef::Exceptions::ResourceNotFound - Cannot find a resource matching service[ssh] (did you define it first?)
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource_collection.rb:115:in `lookup'

My Kitchenfile looks like this.

cookbook "openssh" do      
  configuration("config") { runtimes [] }
  runtimes []              
end



Archive powered by MHonArc 2.6.16.

§