-
Notifications
You must be signed in to change notification settings - Fork 682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using "cmp" Against File Mode Fails #1188
Comments
Thank you for reporting @xiGUAwanOU I tried to recreate this issue:
Is it possible to share the complete example (tiny chef snippet + inspec snippet)? To help with the version of kitchen-inspec and inspec: Are you using bundler? In that case please run:
in the folder of your Gemfile. Otherwise please:
|
I have updated the Chef DK version on the build machine, and this problem doesn't exist anymore. So this could be an already fixed problem. Since the older Chef DK version has been deleted, it is a little bit tricky to get the InSpec version. I've found the InSpec version number in the Gemfile.lock from ChefDK 0.13.21, since the Test Kitchen version (1.7.3) provided by this ChefDK matches the number I've mentioned before. So the version number of InSpec should be 0.18.0. The snippet caused the problem: s3_file local_path do
bucket 'dummy_bucket'
remote_path 'dummy_file'
aws_access_key_id 'dummy_key'
aws_secret_access_key 'dummy_secret'
owner 'vagrant'
group 'vagrant'
mode '0660'
s3_url 'dummy_url'
action :create
end |
@xiGUAwanOU some further testing on our end seems to be confirming that the cmp problem is fixed. If I'm understanding correctly, this is no longer a problem for you as well, right? ("I have updated the Chef DK version on the build machine, and this problem doesn't exist anymore") Please confirm so we can close the issue if that is the case. Thank you :) |
Closing out the issue for now. Please re-open if this is still an issue!! Thank you :) |
Description
I'm writing an inspec description for a file downloaded by
s3_file
cookbook, to test its mode is correct.The mode of the downloaded file is set to
0660
, which is ensured manually withls -l
in the virtual machine. And my inspec description is like this:This example fails on one of the build servers (we have two of them), and I've also tried to manually execute
kitchen converge
andkitchen verify
, it still fails.The failures have following error message:
However, if I use
should eq 0660
, there is no problem any more.InSpec and Platform Version
Test Kitchen version: 1.7.3
I have no idea about how to get the version of InSpec. I'm using
.kitchen.yml
and specified theverifier
asinspec
.The build server is a Mac mini Server (Late 2012), with OS X El Capitan, Version 10.11.5
The text was updated successfully, but these errors were encountered: