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

Blows up if there are no tests at all #49

Closed grosser closed 11 years ago

grosser commented 11 years ago

So basically we had a foo recipe but a test names bar_test, it did not find anything and then just blew up, ideally it should not complain and just have 0 tests

# Running tests:
Finished tests in 0.003379s, 0.0000 tests/s, 0.0000 assertions/s.

0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
[2013-03-04T23:45:08+00:00] ERROR: Report handler MiniTest::Chef::Handler raised #<NoMethodError: undefined method `nonzero?' for nil:NilClass>
[2013-03-04T23:45:08+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/minitest-chef-handler-0.6.8/lib/minitest-chef-handler.rb:44:in `report'
[2013-03-04T23:45:08+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/handler.rb:226:in `run_report_unsafe'
[2013-03-04T23:45:08+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/handler.rb:214:in `run_report_safely'
[2013-03-04T23:45:08+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/handler.rb:93:in `block in run_report_handlers'
[2013-03-04T23:45:08+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/handler.rb:92:in `each'
[2013-03-04T23:45:08+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/handler.rb:92:in `run_report_handlers'
[2013-03-04T23:45:08+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/handler.rb:103:in `block in <class:Handler>'
[2013-03-04T23:45:08+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/client.rb:110:in `call'
[2013-03-04T23:45:08+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/client.rb:110:in `block in run_completed_successfully'
[2013-03-04T23:45:08+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/client.rb:109:in `each'
[2013-03-04T23:45:08+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/client.rb:109:in `run_completed_successfully'
[2013-03-04T23:45:08+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/client.rb:426:in `do_run'
[2013-03-04T23:45:08+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/client.rb:176:in `run'
[2013-03-04T23:45:08+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/application.rb:140:in `run_chef_client'
[2013-03-04T23:45:08+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/application/solo.rb:224:in `block in run_application'
[2013-03-04T23:45:08+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/application/solo.rb:216:in `loop'
[2013-03-04T23:45:08+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/application/solo.rb:216:in `run_application'
[2013-03-04T23:45:08+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/lib/chef/application.rb:72:in `run'
[2013-03-04T23:45:08+00:00] ERROR: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.18.2/bin/chef-solo:25:in `<top (required)>'
[2013-03-04T23:45:08+00:00] ERROR: /usr/bin/chef-solo:23:in `load'
[2013-03-04T23:45:08+00:00] ERROR: /usr/bin/chef-solo:23:in `<main>'
[2013-03-04T23:45:08+00:00] INFO: Report handlers complete
calavera commented 11 years ago

totally