【发布时间】:2021-07-08 12:32:16
【问题描述】:
我正在尝试在这样的 Inspec 测试中使用来自 .kitchen.yml 的输入值:
/.kitchen.yml
- inputs:
my_service: some_service_name
/tests/my_test.rb
describe command('/bin/some_app status (input('my_service'))')
its('stdout') { should include 'foo' }
end
不幸的是,当我尝试kitchen verify 套件时,我遇到了语法错误。
目标是测试/bin/some_app status my_service 的输出是否包含foo。
【问题讨论】:
-
您用来提供输入的命令是什么?您是否尝试在外部范围内使用
input()?
标签: chef-infra inspec