test-kitchen / test-kitchen

Test Kitchen is an integration tool for developing and testing infrastructure code and software on isolated target platforms
Other
1.87k stars 586 forks source link

Automatically copy test/fixtures/cookbooks #700

Open jtimberman opened 9 years ago

jtimberman commented 9 years ago

Currently, test kitchen will copy cookbooks to the node under test:

However, it is particularly common idiom to have cookbooks for test purposes like a "fake" or "test" cookbook in ./test/integration/cookbooks, or (more properly IMO) ./test/fixtures/cookbooks. Test Kitchen should automatically copy these cookbooks. The rationale is that if you don't have any dependencies in your cookbook's metadata, and the only thing you need is a test cookbook, it's much faster to just copy these cookbooks over instead of having to specify them in a berksfile or cheffile and have a resolver handle them.

Opening this issue per HipChat conversation with @fnichol, and it would be great to get this into 1.5.0 (probably missed the window for 1.4.0 for new features like this since we're RC).

miketheman commented 9 years ago

I like this idea!

Something that should be made painfully clear is that any fixtures won't be "resolved", so any dependencies of a fixture cookbook will have to be synced with something like a Berksfile anyhow.

tyler-ball commented 9 years ago

If you want the ability to sync extra local cookbooks today, you can use the policyfile provisioner and specify the path to a local cookbook in your policyfile.rb

But for people who aren't using policyfiles (or berkshelf or librarian) adding a configurable list of extra paths to sync makes sense.

atheiman commented 7 years ago

this hasn't been implemented has it?

coderanger commented 7 years ago

@atheiman No, the issue is still open. You are welcome to add it if you like. Most people do this via Berks or the Policyfile system these days so having it in TK itself hasn't been a huge priority.

EasyAsABC123 commented 7 years ago

i want this 👍