Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在InSpec中找到了一种方法来测试是否已使用 chef 安装了 python 模块,但我正在使用ChefSpec并且找不到替代方法。有谁知道是否有办法检查某个 pip 模块是否已安装ChefSpec?
ChefSpec
ChefSpec 不会测试副作用,因此您不会检查模块本身,而是查看计划执行的资源。如果您使用的是 poise-python,那将意味着像这样的测试:
it { is_expected.to install_python_package('foo') }