[chef] Re: Accessing Test Kitchen YML Attributes


Chronological Thread 
  • From: Noah Kantrowitz < >
  • To:
  • Subject: [chef] Re: Accessing Test Kitchen YML Attributes
  • Date: Thu, 5 Mar 2015 20:35:07 -0800


On Mar 5, 2015, at 8:15 PM, Rudi 
< >
 wrote:

> Hi,
> 
> Ah OK .. that makes sense then, I was really getting frustrated.
> 
> What kind of use case is attributes used for then?
> 
> From here: https://docs.chef.io/kitchen.html
> 
> suites:
> 
>   
> - name: suite_name
> 
>     
> run_list:
> 
>       
> - recipe[cookbook_name::recipe_name]
> 
>     
> attributes: { foo: "bar"} 
> 
>     
> excludes:
> 
>       
> - platform-version
> 
> Where would you actually use the 'foo' property?
> My assumption was inside the test suites.

For when a recipe can be configured via Chef attributes and you want to test 
how it behaves with non-default values. It is just slightly faster than 
making a test-only wrapper cookbook and setting them that way even if thats 
how you would do it in production.

--Noah

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail




Archive powered by MHonArc 2.6.16.

§