You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a file does not match the intended mode value, the failure return does not list what the mode is in the typical fashion, i.e., 0644, 0777, etc. Instead, as in the following example, it returns that it should equal 416 but instead equals 420. I would expect it to return the file permissions.
root@997d17a0fd01:~# cat spec.rb
describe file('/root/file') do
its('mode') { should eq 0640 }
end
root@997d17a0fd01:~# ls -l file
-rw-r--r-- 1 root root 0 Nov 10 18:17 file
root@997d17a0fd01:~# inspec exec spec.rb
F
Failures:
1) File /root/file mode should eq 416
Failure/Error: its('mode') { should eq 0640 }
expected: 416
got: 420
(compared using ==)
# spec.rb:2:in `block (2 levels) in load'# /var/lib/gems/1.9.1/gems/inspec-0.9.2/lib/inspec/runner.rb:89:in `run_with'# /var/lib/gems/1.9.1/gems/inspec-0.9.2/lib/inspec/runner.rb:85:in `run'# /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'# /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'# /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'# /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
Finished in 0.04819 seconds (files took 0.21259 seconds to load)
1 example, 1 failure
Failed examples:
rspec # File /root/file mode should eq 416
The text was updated successfully, but these errors were encountered:
@ScottKinder Thanks for reporting this! I agree with you, its hard to work with the current output. We need to optimize the output to print the permissions in a human readable way
When a file does not match the intended mode value, the failure return does not list what the mode is in the typical fashion, i.e., 0644, 0777, etc. Instead, as in the following example, it returns that it should equal 416 but instead equals 420. I would expect it to return the file permissions.
The text was updated successfully, but these errors were encountered: