mirror of
https://github.com/inspec/inspec
synced 2024-11-27 07:00:39 +00:00
folders on freebsd have content when read
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
This commit is contained in:
parent
6c29580de0
commit
c23e98c902
1 changed files with 24 additions and 10 deletions
|
@ -18,8 +18,30 @@ describe 'file interface' do
|
|||
file.type.must_equal(:directory)
|
||||
end
|
||||
|
||||
it 'has no content' do
|
||||
file.content.must_equal(nil)
|
||||
if os[:family] == 'freebsd'
|
||||
it 'has freebsd folder content behavior' do
|
||||
file.content.must_equal("\u0003\u0000")
|
||||
end
|
||||
|
||||
it 'has an md5sum' do
|
||||
file.md5sum.must_equal('598f4fe64aefab8f00bcbea4c9239abf')
|
||||
end
|
||||
|
||||
it 'has an sha256sum' do
|
||||
file.sha256sum.must_equal('9b4fb24edd6d1d8830e272398263cdbf026b97392cc35387b991dc0248a628f9')
|
||||
end
|
||||
else
|
||||
it 'has no content' do
|
||||
file.content.must_equal(nil)
|
||||
end
|
||||
|
||||
it 'has an md5sum' do
|
||||
file.md5sum.must_equal(nil)
|
||||
end
|
||||
|
||||
it 'has an sha256sum' do
|
||||
file.sha256sum.must_equal(nil)
|
||||
end
|
||||
end
|
||||
|
||||
it 'has owner name root' do
|
||||
|
@ -42,14 +64,6 @@ describe 'file interface' do
|
|||
file.link_path.must_be_nil
|
||||
end
|
||||
|
||||
it 'has an md5sum' do
|
||||
file.md5sum.must_equal(nil)
|
||||
end
|
||||
|
||||
it 'has an sha256sum' do
|
||||
file.sha256sum.must_equal(nil)
|
||||
end
|
||||
|
||||
it 'has a modified time' do
|
||||
file.mtime.must_be_close_to(Time.now.to_i - Test.mtime/2, Test.mtime)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue