0

I'm attempting to use an input value from .kitchen.yml in an Inspec test like this:

/.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

Unfortunately, I'm greeted with syntax errors when I try to kitchen verify the suite. The goal is to test if the output of /bin/some_app status my_service contains foo.

Mike D
  • 365
  • 6
  • 16
  • what is the command you use to provide the input? did you try to use the `input()` in the outer scope? – Mr. Jul 03 '21 at 16:02

1 Answers1

0

Found the solution to the syntax issue. Correct syntax:

describe command("/bin/some_app status " + input("my_service"))
  its('stdout') { should include 'foo' }
end
Dharman
  • 30,962
  • 25
  • 85
  • 135
Mike D
  • 365
  • 6
  • 16