Chef Run Errors with Minitest-Handler


#1

Hi everybody,

I’m using the minitest-handler cookbook. The tests pass and the chef run
seems to be successful in the end, but there are lots of errors logged to
stdoud, e.g.:

[2012-12-02T20:47:52+00:00] INFO:
remote_directory[tests-support-tdd-example-default] created directory
/var/chef/minitest/tdd-example/support

[2012-12-02T20:47:52+00:00] ERROR:
remote_directory[tests-support-tdd-example-default]
(minitest-handler::default line 60) had an error: cookbook tdd-exam

ple has no directory files/default/tests/minitest/support;
ignore_failure is set, continuing

================================================================================

Error executing action create on resource
’remote_directory[tests-support-tdd-example-default]’

================================================================================

Chef::Exceptions::FileNotFound


cookbook tdd-example has no directory files/default/tests/minitest/support

Resource Declaration:


In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/minitest-handler/recipes/default.rb

60: remote_directory “tests-support-#{cookbook_name}-#{recipe_name}” do
61: source “tests/minitest/support”

62: cookbook cookbook_name
63: path "#{node[‘minitest’][‘path’]}/#{cookbook_name}/support"
64: recursive true
65: ignore_failure true
66: end
67: end

Compiled Resource:


Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/minitest-handler/recipes/default.rb:60:in

`block in from_file’

remote_directory(“tests-support-tdd-example-default”) do
provider Chef::Provider::RemoteDirectory

action :create
ignore_failure true

retries 0
retry_delay 2
path "/var/chef/minitest/tdd-example/support"
recursive true
source "tests/minitest/support"
files_backup 5
files_mode 420

overwrite true
cookbook “tdd-example”

cookbook_name :"minitest-handler"
recipe_name “default”

end

Full chef run output here:

Is this the expected behaviour?

Cheers,
Torben


#2

On 12/2/12 1:15 PM, Torben Knerr wrote:

Hi everybody,

Is this the expected behaviour?

It is expected in the sense that this is currently the output you will
see for any cookbooks in the run_list that don’t have tests defined. In
previous versions of Chef the error output was likely less intrusive
since we didn’t have error inspectors outputting what is usually very
helpful information.

I just opened a pull request here:

It is a bit of a hack but it does reduce the noise substantially.

Cheers,

Steven


Steven Danna
Systems Engineer, Opscode, Inc
GPG Key: http://stevendanna.github.com/downloads/code/public.key