Open maratsal opened 4 years ago
please let me know if any other information is needed.
In your example, you use match
which expects a regular expression, but you supplied a string.
You may want to try:
its('content') { should cmp "# FILE MANAGED BY CHEF, DO NOT EDIT\n* hard core 0" }
Or use a regexp
its('content') { should match /hard.core.[0]/ }
You can find all the docs on our matchers here: https://www.inspec.io/docs/reference/matchers/
Please let us know if you're still having issues with the file resource.
for sure will give a try. however I think it is more some additional text added to the string from ssh session Last login: Sat Oct 26 21:09:58 EDT 2019
is causing this mismatch.
Ok. I think this issue is something in kitchen-inspec rather than inspec.
Ok. I think this issue is something in kitchen-inspec rather than inspec.
Is there a way to get more verbose output from kitchen runs to get more details from the verification stage?
Describe the problem
When run kitchen verify it reports that content of the file is not matching. However when I check file content manually - the content is right. Seems when kitchen verify is fetching content of the file it appends ssh last login information to the content of the file: The check:
Failure:
chef dk version I use:
And here is my OS: