I’m working in my local test kitchen to develop a cookbook which depends on a cookbook I’ve already written & tested locally.
I’ve run into a problem with dependencies so I’ve thrown together a couple of cookbooks, testuser & testuser2.
In testuser2 I have the following metadata.rb
depends 'testuser', '~> 0.1'
testusers metadata.rb version statement looks like this;
version ‘0.1.0’
I’ve run a berks install from the testuser cookbook but when I try to converge testuser2 I get the following error;
-----> Starting Kitchen (v1.15.0)
-----> Converging <default-centos-72>...
Preparing files for transfer
Preparing dna.json
Resolving cookbook dependencies with Berkshelf 5.6.0...
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>> Failed to complete #converge action: [Unable to satisfy constraints on package testuser, which does not exist, due to solution constraint (testuser2 = 0.1.0). Solution constraints that may result in a constraint on testuser: [(testuser2 = 0.1.0) -> (testuser ~> 0.1)]
Missing artifacts: testuser
Demand that cannot be met: (testuser2 = 0.1.0)
Unable to find a solution for demands: testuser2 (0.1.0)] on default-centos-72
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
A berks list from the testuser cookbook shows the following;
$ berks list
- testuser (0.1.0) from source at .
- users (4.0.3)