[chef] test-kitchen: how to test data driven recipes with databags?


Chronological Thread 
  • From: Torben Knerr < >
  • To:
  • Subject: [chef] test-kitchen: how to test data driven recipes with databags?
  • Date: Mon, 20 Aug 2012 10:21:18 +0200

Ohai again!

is there currently a way to test recipes that are configured via databags?

There's no `chef.data_bags_path` in the Vagrantfile:
https://github.com/opscode/test-kitchen/blob/master/config/Vagrantfile#L97-102

So I assume it's not supported so far, unless someone can prove me wrong.

An easy solution would be to hava a databags dir alongside with the
cookbooks dir in the test kitchen and reference that in the
Vagrantfile, i.e.:
<cookbook>/test/kitchen/cookbooks
<cookbook>/test/kitchen/databags

It would get more tricky if you want to "override" a databag for a
specific configuration. Not sure how to handle this best, but
something like prefixing the databag with the configuration name or
having a subdirectory with configuration name come to my mind.

What do you think?

Cheers,
Torben


P.S.: will create a JIRA ticket for this, but want to discuss it here first



Archive powered by MHonArc 2.6.16.

§