Skipping specific minitest execution in community cookbooks


#1

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


#2

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 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