[chef] Re: Re: Call for Testing: significant changes made to minitest-handler-cookbook


Chronological Thread 
  • From: Bryan Berry < >
  • To:
  • Subject: [chef] Re: Re: Call for Testing: significant changes made to minitest-handler-cookbook
  • Date: Thu, 11 Apr 2013 17:14:59 +0200

hmm, i don't know, i feel like setting this w/ an attribute will just
make the issue more complicated

i could be swayed to make it  files/default/test rather than just 
files/default/

On Thu, Apr 11, 2013 at 5:02 PM, David Petzel 
< >
 wrote:
> I gave this a quick run on Windows this AM, using the older path location
> for tests and support files, and I didn't run into any issues.
>
> What do you think about moving the file path out to an attribute as opposed
> to deprecating the current location. With deprecation comes the assumption
> that at some point the existing path will no longer be support. That has the
> potential for a decent amount of work for folks. I for one would have to
> incur a decent amount of work to move all our test files.
>
> We've wrapped a simple "cookbook create" task so it creates a skeleton test
> file in the current location, so we don't suffer placing them in the wrong
> directory too much, albeit it does still happen at times.
>
> It feels like using an attribute to control this would allow you achieve
> your goal of flattening the path, while not incurring a lot of work
> consumers of the cookbook.
>
> Thoughts?
>
>
> On Thu, Apr 11, 2013 at 6:19 AM, Bryan Berry 
> < >
>  wrote:
>>
>> Dear Chefs,
>>
>> I have significantly refactored the minitest-handler-cookbook and
>> added tests using test-kitchen 1.0 + kitchen-lxc driver.
>>
>https://github.com/btm/minitest-handler-cookbook/tree/refactor
>>
>> In this refactoring i have done my done my best to clean up the code
>> and simplify its use. My changes are backwards compatible so current
>> use should not break. I wrote parts of the minitest-handler cookbook
>> before knowing much about existing ruby testing practices. For this
>> reason the cookbook was unnecessarily complicated.
>>
>> Old Convention:
>>
>> place your tests in files/default/tests/minitest/<recipe-name>_test.rb
>> and support files in files/default/tests/minitest/support/
>>
>> About 70% of the time I place my tests in the wrong directory and
>> misname them. My fingers also tire from typing these long paths. For
>> this reason I have changed the convention.
>>
>> New Convention:
>>
>> Place your tests in files/default/<recipe-name>_test.rb and support
>> files in files/default/
>> For example, put tests for the default recipe in
>> files/default/default_test.rb and your helper file in
>> files/default/spec_helper.rb
>>
>> In the new branch, minitest-handler will still copy files located in
>> files/default/tests/minitest/ and files/default/tests/minitest/support
>>
>> I would really prefer to put such tests in   test/ or test/minitest/
>> but then these files would not be uploaded to chef-server. I have
>> opened this ticket  http://tickets.opscode.com/browse/CHEF-4044 to
>> change this but I haven't seen any progress on it yet.
>>
>> New Feature:
>>
>> By default, minitest-handler will load all test files for each recipe
>> loaded during the chef run, whether via the run_list, through a role,
>> or include_recipe. You can tell minitest-handler to only load tests
>> for certain recipes using the node[:minitest][:recipes] attribute. If
>> that attribute is non-empty, minitest-handler will only execute the
>> tests specified in that list.
>>
>> Call for Testing:
>>
>> I have only tested this new branch w/ ubuntu linux. I could really use
>> testing help to ensure that recipes loaded through a role are tested
>> and to test this cookbook on Windows.
>>
>> If I don't hear of any major issues on this branch, I will merge it
>> into master early next week and push it to community.opscode.com
>
>



Archive powered by MHonArc 2.6.16.

§