[chef] Re: Re: Accessing Test Kitchen YML Attributes


Chronological Thread 
  • From: Rudi < >
  • To:
  • Subject: [chef] Re: Re: Accessing Test Kitchen YML Attributes
  • Date: Fri, 6 Mar 2015 12:59:58 +0800

Hi,

OK got it.

Thank you kindly.



On Fri, Mar 6, 2015 at 12:35 PM, Noah Kantrowitz < " target="_blank"> > wrote:

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





Archive powered by MHonArc 2.6.16.

§