(moved from GitHub: https://github.com/inspec/inspec/issues/4643)
Describe the problem
When run kitchen verify it reports that symbolic link is not linked to proper location. However when I check file manually - the link is right:
The check:
describe file('/etc/systemd/system/ctrl-alt-del.target') do
it { should be_linked_to '/dev/null' }
end
Failure:
× File /etc/systemd/system/ctrl-alt-del.target should be linked to "/dev/null"
expected `File /etc/systemd/system/ctrl-alt-del.target.linked_to?("/dev/null")` to return true, got false
Manual check:
$ ls -la /etc/systemd/system/ctrl-alt-del.target
lrwxrwxrwx. 1 root root 9 Oct 26 20:42 /etc/systemd/system/ctrl-alt-del.target -> /dev/null
chef dk version I use:
$ chef --version
ChefDK version: 4.5.1
Chef Infra Client version: 15.4.45
Chef InSpec version: 4.18.0
Test Kitchen version: 2.3.3
Foodcritic version: 16.1.1
Cookstyle version: 5.9.3
And here is my OS:
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.15
BuildVersion: 19A602