- From: Joshua Timberman <
>
- To: "
" <
>
- Subject: [chef] Re: Minitest dependencies in test-kitchen
- Date: Mon, 3 Sep 2012 04:24:32 +0000
- Accept-language: en-US
Ohai,
On Sep 2, 2012, at 12:36 PM, John Dewey
<
>
wrote:
>
I am in the process of adding configuration support to the openssh
>
community cookbook.
Awesome :-).
Have you seen this ticket?
http://tickets.opscode.com/browse/COOK-1014
Discussion has stalled as we haven't caught up in the resolved ticket backlog
for code review, though.
>
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
You'll need to add a configuration for "default", too. The way the
Kitchenfile works here is if there aren't any configurations defined, then
"default" is used. Otherwise, it only tests the listed configurations.
I believe this is because the "default" recipe might do "include_recipe", so
you could add the included recipe as a configuration along with others.
cookbook "openssh" do
configuration("default") { runtimes [] }
configuration("config") { runtimes [] }
runtimes []
end
--
Opscode, Inc
Joshua Timberman, Technical Community Manager
IRC, Skype, Twitter, Github: jtimberman
Archive powered by MHonArc 2.6.16.