When you add cookbooks as dependencies with the “depends” statement to the metadata.rb file of your Chef cookbook, to be able to test your cookbooks in Chef Test Kitchen, you also have to specify the location of those cookbooks in the Berksfile file.
For all the cookbooks that are available on the Chef Supermarket, one line
is sufficient to specify their location. If a cookbook is only available at GitHub, specify the location with
cookbook 'COOKBOOK_NAME', git: 'firstname.lastname@example.org:PATH_TO_COOKBOOK.git'
If the cookbook is available on the local drive of the workstation, specify the path with
cookbook 'COOKBOOK_NAME', path: '../COOKBOOK_FOLDER_NAME'
Use the above relative path if all of your cookbooks are under the same cookbooks directory.
If a reference to a Chef cookbook is missing from the Berksfile file, the following message appears when you execute berks update.
Unable to satisfy constraints on package …, which does not exist, due to solution constraint (… = …). Solution constraints that may result in a constraint on …: [(… = …) -> (… >= …)]
Missing artifacts: ...
Demand that cannot be met: (… = …)
Unable to find a solution for demands: … (…)