我制作了一本新的 Recipe 并尝试在厨房进行测试。
$ chef generate cookbook mycookbook
$ cd mycookbook
$ kitchen test
结果是:
-----> Starting Kitchen (v1.11.1)
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ClientError
>>>>>> Message: Could not load the 'inspec' verifier from the load path. Please ensure that your transport is installed as a gem or included in your Gemfile if using Bundler.
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
我检查了.kitchen/logs/kitchen.log
,但什么也没有。
最佳答案
我通过安装 Kitchen 的 Inspec 驱动程序解决了此错误。 https://github.com/inspec/kitchen-inspec
# Install
gem install kitchen-inspec
# Verify error
kitchen list
编辑: 我再次遇到同样的错误,这次我需要:
- 更新chefDK (4.0.60)
- 安装:
chef gem install kitchen-inspec
[kitchen-inspec/issues/105](来自:https://github.com/inspec/kitchen-inspec/issues/105) 这里提示我接受新的 ChefDK 的 Chef 执照。 - 验证错误:
厨房列表
关于chef-infra - ‘kitchen test’命令失败,加载路径中出现 "Could not load the ' inspec’验证程序。”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39160876/