Failed to install cookbooks from lockfile

During Chef cookbook testing with Test Kitchen only one “converge” action can update the Policyfile.lock.json at a time.

If you test multiple recipes in the same cookbook, wait for the “Updating policy lock using /usr/local/bin/chef-cli update” message before starting the next converge otherwise we get the error message:

STDOUT: Installing cookbooks from lock
STDERR: Error: Failed to install cookbooks from lockfile
Reason: (NoMethodError) undefined method `[]’ for nil:NilClass

Leave a comment

Your email address will not be published. Required fields are marked *