This is my current situation, I have a single cookbook in an internal git repo. In that cookbook I have to keep several policy files and test them, for that I created a directory called policyfiles inside the cookbook, being something like this:
MyCookbook
|--attributes
|--recipes
|--templates
|--spec
|--policyfiles
| |- a.rb
| |- b.rb
|--other files.
My problem is that I have to test those a.rb and b.rb policyfiles with Kitchen, so I tried using chef_zero without any luck reading those policyfiles and then tried policyfile_zero as Kitchen provisioner... in this case it can read a policyfile lock file (For example, a.lock.json) but only if it is placed in the cookbook root directory and renamed to Policyfile.lock.json
This is extremely clunky and not practical, could anyone please provide some insight about how to test policyfiles locally with Kitchen? I can't believe this is the only way to do so.