# Skipping specific minitest execution in community cookbooks

**URL:** <https://discourse.chef.io/t/skipping-specific-minitest-execution-in-community-cookbooks/4971>\
**Category:** Chef Infra (archive)\
**Created:** [January 8, 2014, 6:52am UTC](https://discourse.chef.io/t/skipping-specific-minitest-execution-in-community-cookbooks/4971 "2014-01-08T06:52:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roman\_Bobrovski](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/roman_bobrovski/32/409_2.png) [@Roman\_Bobrovski](https://discourse.chef.io/u/Roman_Bobrovski)\
**Post date:** [January 8, 2014, 6:52am UTC](https://discourse.chef.io/t/skipping-specific-minitest-execution-in-community-cookbooks/4971/1 "2014-01-08T06:52:38Z")

</div>

Ohai Chefs!

We are using application or wrapper coobook to encapsulate all needed  
functionality for specific app.  
Let’s say we have “mywebapp” cookbook that depends on community "apache2"  
cookbook.

When we running minitest-handler for “mywebapp” it executes apache2  
minitest tests along with, usually it’s ok but for this specific cookbook  
tests appear to be broken for a long time (including pending pull requests  
with fixes).

The question is how can we skip specific tests until they fixed because we  
rely on integration tests in our CI process.

We’ve tried setting attribute:  
node.default[:minitest][:filter] = ‘/^((?!apache2).)\*$/’

for “minitest-handler” cookbook, but it keeps loading apache2 minitests.

Alternatively we can can change attribute from default

node.default[:minitest][:tests] = ‘\*\*/\*\_test.rb’

to custom pattern

node.default[:minitest][:tests] = ‘\*\*/\*\_acme\_corporation\_test.rb’

but this will disable all 3rd party tests which is not preferable solution  
as they add significant coverage.

–

Roman Bobrovski

---

<div class="post-metadata">

**Author:** ![Roman\_Bobrovski](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/roman_bobrovski/32/409_2.png) [@Roman\_Bobrovski](https://discourse.chef.io/u/Roman_Bobrovski)\
**Post date:** [January 9, 2014, 6:06pm UTC](https://discourse.chef.io/t/skipping-specific-minitest-execution-in-community-cookbooks/4971/2 "2014-01-09T18:06:26Z")

</div>

Ohai again,

If somebody interested in one of the ways of problem solution,  
I've added optional attribute in order to ignore specific recipies:

> <https://github.com/idevops/minitest-handler-cookbook/commit/b4d293e552cc73fe825fd3b1d1b2a60cd790f0cf>

this way, problematic recipes can be excluded from minitest-handler run  
list:  
node.default[:minitest][:ignore\_recipes] = ['apache2::default']

On Wed, Jan 8, 2014 at 8:52 AM, Roman Bobrovski [rombob@gmail.com](mailto:rombob@gmail.com) wrote:

> Ohai Chefs!
> 
> We are using application or wrapper coobook to encapsulate all needed  
> functionality for specific app.  
> Let's say we have "mywebapp" cookbook that depends on community "apache2"  
> cookbook.
> 
> When we running minitest-handler for "mywebapp" it executes apache2  
> minitest tests along with, usually it's ok but for this specific cookbook  
> tests appear to be broken for a long time (including pending pull requests  
> with fixes).
> 
> The question is how can we skip specific tests until they fixed because we  
> rely on integration tests in our CI process.
> 
> We've tried setting attribute:  
> node.default[:minitest][:filter] = '/^((?!apache2).)\*$/'
> 
> for "minitest-handler" cookbook, but it keeps loading apache2 minitests.
> 
> Alternatively we can can change attribute from default
> 
> node.default[:minitest][:tests] = '\*\*/\*\_test.rb'
> 
> to custom pattern
> 
> node.default[:minitest][:tests] = '\*\*/\*\_acme\_corporation\_test.rb'
> 
> but this will disable all 3rd party tests which is not preferable solution  
> as they add significant coverage.
> 
> --
> 
> Roman Bobrovski

--

Roman Bobrovski
