mirror of
https://github.com/inspec/inspec
synced 2025-02-18 15:08:44 +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)
|
file.type.must_equal(:directory)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has no content' do
|
if os[:family] == 'freebsd'
|
||||||
file.content.must_equal(nil)
|
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
|
end
|
||||||
|
|
||||||
it 'has owner name root' do
|
it 'has owner name root' do
|
||||||
|
@ -42,14 +64,6 @@ describe 'file interface' do
|
||||||
file.link_path.must_be_nil
|
file.link_path.must_be_nil
|
||||||
end
|
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
|
it 'has a modified time' do
|
||||||
file.mtime.must_be_close_to(Time.now.to_i - Test.mtime/2, Test.mtime)
|
file.mtime.must_be_close_to(Time.now.to_i - Test.mtime/2, Test.mtime)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue